javascript - how to customize individual textarea in tinyMCE -
this answer explains how to, example, remove menubar , status bar all form fields in tinymce:
tinymce.init({ selector: "textarea", menubar:false, statusbar: false, .. });
my question is: how can individual text areas? ie have status bars , others not to..
you need give textarea
element id , use in every configuration:
tinymce.init({ selector: "textarea#editor1", menubar:false, statusbar: false, ... }); <textarea id="editor1"></textarea> tinymce.init({ selector: "textarea#editor2", // standard toolbar editor 2 ... }); <textarea id="editor2"></textarea> // , on...
this way tell tinymce textarea configuration in effect. have @ advanced example on tinymce site:
selector: "textarea#elm1", select textarea id elm1
update
yes, possible. need set unique id editors, possible select multiple id's @ once this:
<script type="text/javascript"> tinymce.init({ selector: "textarea#common1,textarea#common2", theme: "modern", height: 100, menubar:false, statusbar: false }); tinymce.init({ selector: "textarea#comment_toolbox", theme: "modern", height: 100, toolbar: false }); </script> </head> <body> <div width="100%" height="100%"> <textarea id="common1"></textarea> <br/> <textarea id="comment_toolbox"></textarea> <br/> <textarea id="common2"></textarea> <br/> </div> </body>
the site looks expected:
Comments
Post a Comment