script_baidu.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <script type="text/javascript">
  2. //编辑器路径定义
  3. var editorURL = GV.WEB_ROOT;
  4. </script>
  5. <script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js?v={:config('js_version')}"></script>
  6. <script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js?v={:config('js_version')}"></script>
  7. <script type="text/javascript">
  8. $(function () {
  9. editorcontent = new baidu.editor.ui.Editor( {
  10. toolbars: [
  11. ['fullscreen', 'source', '|', 'undo', 'redo', '|',
  12. 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
  13. 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
  14. 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
  15. 'directionalityltr', 'directionalityrtl', 'indent', '|',
  16. 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
  17. 'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
  18. 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe','insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
  19. 'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
  20. 'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
  21. 'print', 'preview', 'searchreplace', 'help', 'drafts']
  22. ],
  23. initialFrameHeight: {$editor_height|default=400},
  24. autoHeightEnabled: true,
  25. autoFloatEnabled: true
  26. })
  27. editorcontent.render('content');
  28. try {
  29. editorcontent.sync();
  30. } catch (err) {
  31. }
  32. $('#more-template-select').val('page');
  33. });
  34. </script>