问题描述
在CKeditor4上,我创建了不同的插件并将其加载到config中,但仅加载了最后一个。在以下情况下,仅加载plugin3。当我分别加载每个插件时,每个插件都能正常工作:
SELECT * FROM table WHERE column LIKE '%%' ESCAPE '!'
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here.
config.language = 'en';
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' ] }
];
config.removeButtons = 'Save,Preview,Print,Templates,Form,HiddenField,Flash,Iframe';
config.extraPlugins = 'plugin1';
config.extraPlugins = 'plugin2';
config.extraPlugins = 'plugin3';
};
为什么会这样?如何加载所有额外的插件?
解决方法
请先阅读文档:https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins
config.extraPlugins = 'plugin1,plugin2,plugin3';