繁体   English   中英

CKeditor自定义插件顺序

[英]CKeditor custom plugins order

嗨,我将ckeditor版本4.3.2与4个自定义插件一起使用,它们出现在插入工具栏中,我以这种方式调用插件:

extraPlugins: 'aexpagebreak,aexextraline,aexsinglecolumn,aextwocolumn',

它们加载得很好,但是每次重新加载页面时,栏中的插件顺序都会随机更改,如何为工具栏中的插件图标定义固定顺序?

您可以通过定义一个对象来自己配置工具栏,该对象告诉ckeditor如何显示和分组项目。

http://docs.ckeditor.com/#!/guide/dev_toolbar

来自ckeditor的文档:

config.toolbarGroups = [
    { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
    { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
    { name: 'links' },
    { name: 'insert' },
    { name: 'forms' },
    { name: 'tools' },
    { name: 'document',    groups: [ 'mode', 'document', 'doctools' ] },
    { name: 'others' },
    '/',
    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
    { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
    { name: 'styles' },
    { name: 'colors' },
    { name: 'about' }
];

更多信息:

http://docs.ckeditor.com/#!/guide/dev_toolbarconcepts-section-toolbar-groups-configuration

看起来他们的站点上有一个工具栏配置工具,但可能仅适用于v4.5及更高版本。 不确定:

http://ckeditor.com/tmp/4.5.0-beta/ckeditor/samples/toolbarconfigurator/index.html#basic

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM