CKEditor 调整工具栏项目

Posted by Nathan on 2018-06-11

1、加载自定义配置文件

CKEDITOR.replace( ‘editor1’, {
customConfig: ‘/custom/ckeditor_config.js’
});

2、 修改配置文件中的ToolbarGroup项目

config.toolbarGroups = \[


    { name: 'insert' },
    { name: 'forms' },
    { name: 'basicstyles', groups: \[ 'basicstyles', 'cleanup' \] },
    { name: 'paragraph',   groups: \[ 'list', 'indent', 'blocks', 'align', 'bidi' \] },
    { name: 'styles' },
    { name: 'colors' },

\];