CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6E'; config.extraPlugins = 'clipboard,lineutils,widget,dialog,codesnippet'; config.codeSnippet_theme='github'; config.language='en'; config.format_tags='p;h2'; config.format_h2 = { element: 'h2', styles: { 'font-size': '16px','font-weight':'bold'} }; config.toolbar='my'; config.toolbar_my=[ ['Source','Undo','Redo'], ['Bold','Italic','Underline','Strike','RemoveFormat'], ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], ['Link','Unlink'], ['Table','HorizontalRule'], ['Format','Font','FontSize'], ['TextColor','BGColor'], ['Maximize', 'ShowBlocks','-'], ['CodeSnippet'] ]; };
注意大小写,好比CodeSnippet,字母的大小写如果不对,会导致插件加载不正确。
标签:CodeSnippet,ckeditor,配置文件,format,h2,font,config From: https://www.cnblogs.com/coding8832/p/17969525