Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#32873 closed defect (bug) (fixed)

Remove additional toolbar html when editor instance is removed

Reported by: ungestaltbar Owned by: iseulde
Milestone: 4.3 Priority: normal
Severity: normal Version: 4.1
Component: Editor Keywords: has-patch
Focuses: javascript Cc:


Whenever a tinymce instance is (dynamically) created, the tinymce plugins
insert necessary toolbar markup to the document.

This markup is not removed from the DOM when removing an editor instance by calling (for example)

tinyMCE.execCommand('mceRemoveEditor', true, editor_id);

I've attached a rough patch to demonstrate how removal could work and a screenshot of the problem. I didn't find a native method to do this in the tinymce documentation.

Attachments (2)

tinymce_toolbar_markup.png (61.5 KB) - added by ungestaltbar 5 years ago.
Screenshot of toolbar markup after removing the instance
plugin.diff (494 bytes) - added by ungestaltbar 5 years ago.
example patch for wpeditimage/plugin.js

Download all attachments as: .zip

Change History (6)

5 years ago

Screenshot of toolbar markup after removing the instance

5 years ago

example patch for wpeditimage/plugin.js

#1 @iseulde
5 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.3
  • Version changed from trunk to 4.1

Good catch and thanks for the patch!

#2 @iseulde
5 years ago

  • Owner set to iseulde
  • Resolution set to fixed
  • Status changed from new to closed

In 33294:

TinyMCE: inline toolbar: fix memory leaks

Part props ungestaltbar.
Fixes #32873.

#3 @ungestaltbar
5 years ago

Thanks @iseulde !

Similiar situation in wpeditimage


or does your fix take care of the editimage toolbar as well ( looks like it inherits from the toolbar factory )?

#4 @iseulde
5 years ago

This will take care of all inline toolbars. :)

Note: See TracTickets for help on using tickets.