/** * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. * For licensing, see https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: config.language = 'en'; //config.uiColor = '#F7B42C'; //config.height = 300; //config.filebrowserImageUploadUrl='/ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'; //config.filebrowserBrowseUrl='/ckeditor/ckfinder/ckfinder.html'; //config.filebrowserUploadUrl:'/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'; //config.filebrowserBrowseUrl='/ckeditor/ckfinder/ckfinder.html'; //config.filebrowserUploadUrl= '/ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'; config.toolbarCanCollapse = false; config.entities = false; config.basicEntities = false; //config.scayt_autoStartup = true;//打开自动语法检查 //config.scayt_sLang = 'de_DE'; //语法检查语言 //config.enterMode = CKEDITOR.ENTER_BR; config.allowedContent = true; config.toolbarGroups = [ { name: 'document', groups: [ 'mode', 'document', 'doctools' ] }, { name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, { name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] }, { name: 'forms', groups: [ 'forms' ] }, { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] }, '/', { name: 'links', groups: [ 'links' ] }, { name: 'insert', groups: [ 'insert' ] }, { name: 'styles', groups: [ 'styles' ] }, { name: 'colors', groups: [ 'colors' ] }, { name: 'tools', groups: [ 'tools' ] }, { name: 'others', groups: [ 'others' ] }, { name: 'about', groups: [ 'about' ] } ]; //,NumberedList,BulletedList,SpecialChar config.removeButtons = 'Print,Preview,NewPage,Save,Templates,SelectAll,TextField,Textarea,Select,Button,HiddenField,Form,Checkbox,Radio,CreateDiv,Language,Anchor,Flash,HorizontalRule,Smiley,PageBreak,Iframe,ShowBlocks,About,BidiLtr,BidiRtl,searchCode,Copy,Cut'; config.extraPlugins= 'tableresize,uploadimage,image2,codemirror,hianamedia,textselection,wordcount'; config.codemirror = { showFormatButton: false, showCommentButton: false, showUncommentButton: false, showAutoCompleteButton: false, }; config.height=1024; config.width=1024; //config.contentsCss= [ 'https://data.chinahighlights.com/css/min.php?f=/css/train/global140627.css,/css/train/guide.css,/public/css/global.min.css,/css/ui.core.css,/css/ui.datepicker.css,/css/ui.theme.css,/css/calendar.css&v=1565334166829' ]; config.bodyClass= 'document-editor'; // Sometimes applications that convert HTML to PDF prefer setting image width through attributes instead of CSS styles. // For more information check: // - About Advanced Content Filter: http://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_advanced_content_filter // - About Disallowed Content: http://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_disallowed_content // - About Allowed Content: http://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_allowed_content_rules config.disallowedContent='img{width,height,float}'; config.extraAllowedContent= 'img[width,height,align]'; // Reduce the list of block elements listed in the Format dropdown to the most commonly used. config.format_tags= 'p;h1;h2;h3;pre'; // Simplify the Image and Link dialog windows. The "Advanced" tab is not needed in most cases. config.removeDialogTabs= 'image:advanced;link:advanced'; // Define the list of styles which should be available in the Styles dropdown list. // If the "class" attribute is used to style an element, make sure to define the style for the class in "mystyles.css" // (and on your website so that it rendered in the same way). // Note: by default CKEditor looks for styles.js file. Defining stylesSet inline (as below) stops CKEditor from loading // that file, which means one HTTP request less (and a faster startup). // For more information see http://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_styles }; //禁止删除空元素 $.each(CKEDITOR.dtd.$removeEmpty, function (i, value) { CKEDITOR.dtd.$removeEmpty[i] = false; });