TinyMCE: Remove TinyMCE Editor from Textarea
Question by Guest | Last update on 2023-12-19 | Created on 2014-05-06
It was no problem for me to integrate the TinyMCE HTML editor in my existing website using tinymce.init(). However, I have no idea of how to remove an existing editor again.
Is there any possibility to remove TinyMCE from a textarea by JavaScript?
Related Topics
HTML: Preassign HTML Form with Data
Tutorial | 0 Comments
TinyMCE Editor not shown after second call
Question | 3 Answers
Textarea Maxlength: Limit Maximum Number of Characters in Textarea
Tutorial | 3 Comments
PHP: Remove arbitrary Characters at the Beginning and the End of a String
Tutorial | 0 Comments
TinyMCE: Check if TinyMCE is available
Question | 1 Answer
PHP: Convert Line Breaks from Textarea in HTML Line Breaks
Tip | 0 Comments
TinyMCE: Do not convert Special Characters to Named Entities
Question | 1 Answer
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
From TinyMCE version 4 on, this is possible by just calling tinymce.remove().
If you would like to remove all editors, you can just call tinymce.remove() without any parameters:
If you only would like to remove the editors, that are bind to textareas or divs, you can use one of the following commands:
And if you would like to remove only a special instance of TinyMCE, you can also pass the appropriate ID:
Of course, you can also use other selectors such as classes, for example.
Older versions of TinyMCE can be removed using the line tinyMCE.execCommand('mceRemoveControl', false, 'myid'), where you have to adjust "myid" to what you want to remove.
Last update on 2023-12-19 | Created on 2014-05-06