user007 user007 - 2 years ago 461
Javascript Question

TinyMCE 4 - remove() or destroy()

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 :


Please note:

my editor class is
, And I have more then one editors in my page.

Answer Source

You need an editor id (which usually equals your editor html root elements id (in most cases a textarea)).


tinymce.execCommand('mceRemoveControl', true, 'my_original_textarea_id');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download