ckeditor插件无法正常工作/出现



我遵循文档并添加了两个插件:

  • 增强图像(Image2)
  • 增强颜色按钮

,但都没有出现在我的工具栏中。我添加了所有依赖项。

这是我的config.js

CKEDITOR.editorConfig = function( config ) {
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.height = 500;        // 500 pixels.
/*config.removePlugins = 'colorbutton';*/
config.extraPlugins = 'button', 'toolbar', 'notification', 'clipboard', 'lineutils', 'dialogui', 'dialog', 'widgetselection', 'widget', 'image2', 'panel', 'floatpanel', 'panelbutton', 'enhancedcolorbutton';
config.removeButtons = 'NewPage,Source,Scayt,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,Outdent,Indent,Blockquote,CreateDiv,BidiLtr,BidiRtl,Language,Anchor,Flash,SpecialChar,PageBreak,Iframe,BGColor,Maximize,ShowBlocks';
};

任何帮助都非常感谢。

请参阅:https://docs.ckeditor.com/#!/pi/ckeditor.config-cfg-cfg-extraplugins

应将插件列表输入以逗号分隔值的单字符串:

config.extraPlugins = 'button,toolbar,notification,clipboard,lineutils,dialogui,dialog,widgetselection,widget,image2,panel,floatpanel,panelbutton,enhancedcolorbutton';

注意:诸如buttontoolbardialogdialogui之类的插件应在任何预设中可用,因此,除非您有一些非常自定义的软件包,否则不需要使用extraPlugins设置添加它们。他们应该已经在包装中。

最新更新