config.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /**
  2. * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights
  3. * reserved. For licensing, see LICENSE.md or
  4. * http://ckeditor.com/license
  5. */
  6. CKEDITOR.editorConfig = function(config) {
  7. // Define changes to default configuration here. For example:
  8. // config.language = 'fr';
  9. // config.uiColor = '#AADC6E';
  10. // 界面语言,默认为 'en'
  11. config.language = 'zh-cn';
  12. // 设置宽高
  13. config.width = '99%';
  14. config.toolbar = 'Custom';
  15. config.toolbar_Full = [ ['-','Save','NewPage','Preview','-','Templates'],
  16. ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
  17. ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
  18. ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
  19. ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
  20. ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
  21. ['Styles','Format','Font','FontSize'],
  22. ['TextColor','BGColor'],
  23. ['Maximize', 'ShowBlocks','-']
  24. ];
  25. config.toolbar_Custom= [ ['-']];
  26. config.resize_enabled = false; // 禁止拖拽改变尺寸
  27. config.removePlugins = 'elementspath'; // 删除底边栏
  28. config.extraPlugins = 'notification,notificationaggregator'; // 其他插件:字数统计、提示信息
  29. // config.wordcount = {
  30. // showParagraphs : false, // 是否统计段落数
  31. // showWordCount : true, // 是否统计词数
  32. // showCharCount : false, // 是否统计字符数
  33. // countSpacesAsChars : false, // 是否统计空间字符
  34. // countHTML : false, // 是否统计包括HTML字符的字符数
  35. // maxWordCount : -1, // 最大允许词数,-1表示无上限
  36. // maxCharCount : 500, // 最大允许字符数,-1表示无上限
  37. // filter : new CKEDITOR.htmlParser.filter({ // 添加筛选器添加或删除元素之前计数(CKEDITOR.htmlParser.filter),默认值:null
  38. // // (no filter)
  39. // elements : {
  40. // div : function(element) {
  41. // if (element.attributes.class == 'mediaembed') {
  42. // return false;
  43. // }
  44. // }
  45. // }
  46. // })
  47. // };
  48. // 添加中文字体
  49. config.font_names = "宋体/SimSun;新宋体/NSimSun;仿宋_GB2312/FangSong_GB2312;楷体_GB2312/KaiTi_GB2312;黑体/SimHei;微软雅黑/Microsoft YaHei;幼圆/YouYuan;华文彩云/STCaiyun;华文行楷/STXingkai;方正舒体/FZShuTi;方正姚体/FZYaoti;"
  50. + config.font_names;
  51. };