Skip to content

Use tinymce editor only once textarea

I am using tinymce editor and i have 4 textarea in my form when i use tinymce change all my textarea to editor but i want change only one my textarea to editor. it’s my tinymce code:

 <script type="text/javascript">
   selector: "textarea",
    plugins: [
    "advlist autolink lists link image charmap print preview anchor",
    "searchreplace visualblocks code fullscreen",
    "insertdatetime media table contextmenu paste ",
  toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter   alignright alignjustify | bullist numlist outdent indent | link image | forecolor backcolor"

how can do it? thank you


Read this article in the TinyMCE manual. Use mode either with specific_textareas or exact.

Your initialisation code should look like this:

    mode : "specific_textareas",
    editor_selector : "YourOwnEditor"


    mode : "exact",
    elements : "myarea1"

…and your HTML could look like this:

<textarea id="myarea1" class="YourOwnEditor">This will be the editor!</textarea>
<textarea id="myarea2">This will not be an editor.</textarea>