TinyMCE configuration for rich textbox


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
  2. <script type="text/javascript"> tinyMCE.init({
  3. //elements: "txtField1,txtField2",
  4. editor_deselector: "mceNoEditor",
  5. mode: "textareas",
  6. theme: "advanced",
  7. plugins: "safari,style,spellchecker,searchreplace,print,paste,directionality,fullscreen,noneditable,nonbreaking,xhtmlxtras,template",
  8. // Theme options
  9. theme_advanced_buttons1: "bold,italic,underline,strikethrough,forecolor,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect",
  10. theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,spellchecker,|,ltr,rtl,|,fullscreen",
  11. theme_advanced_buttons3: "",
  12. theme_advanced_toolbar_location: "external",
  13. theme_advanced_toolbar_align: "left",
  14. //theme_advanced_statusbar_location: "bottom",
  15. theme_advanced_resizing: false,
  16. //theme_advanced_disable: "sup,sub,removeformat,hr,|,charmap,image",
  17. // Example content CSS (should be your site CSS)
  18. content_css: "../Stylesheets/Style.css",
  19. editor_css: "../JScripts/tiny_mce/themes/advanced/skins/default/tinyMCEUi.css",
  20. width: "100%",
  21. //height: "200",
  22. spellchecker_rpc_url: "../TinyMCEHandler.aspx?module=SpellChecker",
  23. readonly: '<%=myReadonly %>',
  24. //onchange_callback: "tinyMceOnChange",//for counter
  25. //handle_event_callback: "tinyMceEventHandler"//for counter
  26. paste_retain_style_properties: "font-size,font-family,font-style,color"
  27. });
  28. </script>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.