I am using tinymce, I have multiple text areas on my page. Is it possible to apply for only one textarea,
1 text area is for description validation is like below
 var text = tinyMCE.get('txtdesc').getContent();   But i have more 3 more text areas in my page so tineMCE should not apply for all these text areas
How can i apply only for one text area
 // this is my tinyMCE code      tinyMCE.init({         mode : "textareas",         theme : "advanced"     });  // /tinyMCE 
                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 tinyMCE editor_selector : "mceEditor", // class="mceEditor" will. Source.
As of TinyMCE 4.0.x
selector: "textarea", // Select all textarea selector: "textarea.editme", // Select all textarea with the class editme selector : "textarea:not(.mceNoEditor)", // Select all textarea exluding the mceNoEditor class Source.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With