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.
Bu
If you have multiple Instances of TinyMCE you can use following code snippet to close every instance of TinyMCE:
for (var i = tinymce.editors.length - 1 ; i > -1 ; i--) {
var ed_id = tinymce.editors[i].id;
tinyMCE.execCommand("mceRemoveEditor", true, ed_id);
}
I use it before the Ajax Content is loaded.
When using the tiyMCE.init({}) fuction
, the answer by @nikmauro works for me, so for every unload of the page, you just trigger the tinymce.get("real_element_id").remove();
That method works for me.
BTW, I amusing this version
//tinymce.cachefly.net/4.1/tinymce.min.js
By simply using this you can remove TinyMCE editor:
tinymce.remove('#your_textarea_id');