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