I am using TinyMCE editor. I want to remove or destroy tinymce editors (Page contain more then one editor). Also remove classes and IDs added by tinyMCE.
But leave editable contents
I tried :
tinymce.remove()
tinymce.destroy()
tinymce.execCommand('mceRemoveControl',true,'.editable');
Please note:
my editor class is .editable
, And I have more then one editors in my page.
Simply use
to remove all editors.
Fake a virgin website
TinyMCE will check if its already loaded in
window.scripts
. If you remove the according entry TinyMCE will behave like it is a untouched document.When using the
tiyMCE.init({}) fuction
, the answer by @nikmauro works for me, so for every unload of the page, you just trigger thetinymce.get("real_element_id").remove();
That method works for me.
BTW, I amusing this version
You need an editor id (which usually equals your editor html root elements id (in most cases a textarea)).
Example:
I had the same problem. In v4 all suggestions above did not work for me, but this did:
I use inline editor:
Hope this helped