ueditor.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <script src="/static/ueditor1.4.3/ueditor.config.js"></script>
  2. <script src="/static/ueditor1.4.3/ueditor.all.js"></script>
  3. <script src="/static/ueditor1.4.3/lang/zh-cn/zh-cn.js"></script>
  4. <textarea name="{$name}">{$val}</textarea>
  5. <script type="text/javascript">
  6. $('textarea[name="{$name}"]').attr('id', 'editor_id_{$name}');
  7. window.UEDITOR_HOME_URL = "/static/ueditor1.4.3/";
  8. // window.UEDITOR_CONFIG.serverUrl = '';
  9. window.UEDITOR_CONFIG.initialFrameHeight = parseInt({$height});
  10. window.UEDITOR_CONFIG.scaleEnabled = true;
  11. window.UEDITOR_CONFIG.toolbars = [[
  12. 'fullscreen',"source", 'undo', 'redo', 'fontfamily', 'fontsize',
  13. 'bold', 'italic', 'underline', 'strikethrough', 'removeformat',
  14. 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist',
  15. 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify',
  16. 'rowspacingtop', 'rowspacingbottom', 'lineheight', 'insertimage'
  17. ]];
  18. window.UEDITOR_CONFIG.customDomain = true;
  19. window.UEDITOR_CONFIG.contextMenu = [
  20. {
  21. label:'', //显示的名称
  22. cmdName:'selectall',//执行的command命令,当点击这个右键菜单时
  23. },
  24. {
  25. label:'', //显示的名称
  26. cmdName:'cleardoc',//执行的command命令,当点击这个右键菜单时
  27. },
  28. {
  29. label:'', //显示的名称
  30. cmdName:'copy',//执行的command命令,当点击这个右键菜单时
  31. },
  32. {
  33. label:'', //显示的名称
  34. cmdName:'paste',//执行的command命令,当点击这个右键菜单时
  35. }
  36. ];
  37. UE.getEditor('editor_id_{$name}');
  38. </script>