Opened 11 months ago
Last modified 11 months ago
#21371 closed defect (bug)
Help shortcuts added to TinyMCE multiple times when moving wp_editor around the DOM — at Initial Version
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | TinyMCE | Version: | 3.4.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
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.