嗨,我使用的是4.3.2版本的ckeditor版本和4个自定义插件,它们出现在“插入”工具栏中,我以这样的方式调用插件:
extraPlugins: 'aexpagebreak,aexextraline,aexsinglecolumn,aextwocolumn',它们加载得很好,但是每次页面重新加载时,条形插件的顺序都会随机改变,我如何为工具栏中的插件图标定义一个固定的顺序呢?
发布于 2015-11-10 17:44:42
您可以通过定义一个对象来配置工具栏,该对象告诉ckeditor如何显示和分组项。
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' }
];更多信息:
toolbarconcepts-section-toolbar-groups-configuration
看起来他们的站点上有一个工具栏配置工具,但是它可能只适用于v4.5和更高版本。不完全确定:
http://ckeditor.com/tmp/4.5.0-beta/ckeditor/samples/toolbarconfigurator/index.html#basic
https://stackoverflow.com/questions/33636164
复制相似问题