tinymce_setup.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. tinymce.init({
  2. //选择class为content的标签作为编辑器
  3. selector: '#rich_content',
  4. //方向从左到右
  5. directionality:'ltr',
  6. //语言选择中文
  7. language:'zh_CN',
  8. //高度为400
  9. height:300,
  10. width:570,
  11. //工具栏上面的补丁按钮
  12. plugins: [
  13. 'advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker',
  14. 'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',
  15. 'save table contextmenu directionality template paste textcolor',
  16. 'codesample imageupload',
  17. ],
  18. //工具栏的补丁按钮
  19. toolbar: 'insertfile undo redo | \
  20. styleselect | \
  21. bold italic | \
  22. alignleft aligncenter alignright alignjustify | \
  23. bullist numlist outdent indent | \
  24. link image | \
  25. print preview media fullpage | \
  26. forecolor backcolor emoticons |\
  27. codesample fontsizeselect fullscreen |\
  28. imageupload',
  29. //字体大小
  30. fontsize_formats: '10pt 12pt 14pt 18pt 24pt 36pt',
  31. //按tab不换行
  32. nonbreaking_force_tab: true,
  33. imageupload_url: "/user/submit-image"
  34. });