WordPress.org

Make WordPress Core

Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#21371 closed defect (bug) (invalid)

Help shortcuts added to TinyMCE multiple times when moving wp_editor around the DOM

Reported by: needle Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4.1
Component: TinyMCE Keywords: has-patch
Focuses: Cc:

Description (last modified by SergeyBiryukov)

I have successfully implemented wp_editor() on the comment textarea in my theme, and also successfully move the form around the DOM by disabling TinyMCE before the move, then re-enabling it after.

However, each time TinyMCE is enabled, advanced.help_shortcut is added to the iframe's title attribute, resulting in an increasingly long string of repeated shortcuts. This patch prevents them being added if they're already there.

Related ticket #21350 still needed for backwards compatibility.

BTW, thanks for making this so much easier. If you're interested, I use an amended version of addComment from wp-includes/js/comment-reply.dev.js which takes the presence of TinyMCE into account. This is probably plugin territory, though.

Attachments (1)

21371.patch (839 bytes) - added by needle 21 months ago.

Download all attachments as: .zip

Change History (5)

needle21 months ago

comment:1 follow-up: SergeyBiryukov21 months ago

  • Description modified (diff)

comment:2 in reply to: ↑ 1 needle21 months ago

Replying to SergeyBiryukov: thanks

comment:3 azaozz21 months ago

  • Resolution set to invalid
  • Status changed from new to closed

The patch is against tinymce/themes/advanced/editor_template_src.js. Please open a ticket on TinyMCE's bug tracker and submit it there. It needs to be fixed upstream.

comment:4 SergeyBiryukov21 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.