I am using tinymce, Is it possible to apply for only one textarea I am using tinymce, Is it possible to apply for only one textarea javascript javascript

I am using tinymce, Is it possible to apply for only one textarea


For the textarea assign a class="" to textarea property, this will support for you

<script type="text/javascript">    tinyMCE.init({        //mode : "textareas",        mode : "specific_textareas",        editor_selector : "myTextEditor",        theme : "simple"    });</script><textarea id="txtdesc" name="txtdesc" class="myTextEditor" rows="6" cols="96" ></textarea>


In the TinyMCE 3.x config you can put class selectors or deselectors to specifically enable or disable TinyMCE on textareas with certain classes, just put the class="" attribute on your textarea.

editor_deselector : "mceNoEditor" // class="mceNoEditor" will not have tinyMCEeditor_selector : "mceEditor", // class="mceEditor" will.

Source.


As of TinyMCE 4.0.x

selector: "textarea", // Select all textareaselector: "textarea.editme", // Select all textarea with the class editmeselector : "textarea:not(.mceNoEditor)", // Select all textarea exluding the mceNoEditor class

Source.


In TinyMCE 4.x there is no deselector so you can use normal css to determine which textareas are selected and which are not.

<script type="text/javascript">  tinymce.init({        selector: "textarea:not(.textarea-no-styles)", });</script>