[wp-trac] [WordPress Trac] #21371: Help shortcuts added to TinyMCE multiple times when moving wp_editor around the DOM

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 25 12:15:29 UTC 2012


#21371: Help shortcuts added to TinyMCE multiple times when moving wp_editor around
the DOM
--------------------------+------------------------------
 Reporter:  needle        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  TinyMCE       |     Version:  3.4.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------
Description changed by SergeyBiryukov:

Old description:

> 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.

New description:

 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.

--

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21371#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list