/** * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { config.toolbar = 'Full'; config.height = 380; config.toolbar_Full = [ ['Bold','Italic','Underline'], ['NumberedList','BulletedList'], ['Link','Unlink'], ['Image'], ['Font','FontSize'], ['TextColor','BGColor'], ['JustifyLeft','JustifyCenter','JustifyRight'], ['Source'], ['Replace'], ['Maximize'] ]; config.resize_enabled = false; //禁止拖拽改變尺寸 config.removePlugins = 'elementspath'; //刪除底邊欄 config.image_previewText=' '; //清空圖片上傳預覽的內容 config.image_prefillDimensions = false; //禁止圖片上傳完畢后自動填充圖片長和寬 config.filebrowserUploadUrl ="**********"; //圖片上傳接口 config.extraPlugins = 'wordcount,notification,notificationaggregator'; //其他插件:字數統計、提示信息 config.wordcount = { showParagraphs: false, // 是否統計段落數 showWordCount: false, // 是否統計詞數 showCharCount: true, // 是否統計字符數 countSpacesAsChars: false, // 是否統計空間字符 countHTML: false, // 是否統計包括HTML字符的字符數 maxWordCount: -1, // 最大允許詞數,-1表示無上限 maxCharCount: 500, //最大允許字符數,-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; };