如何添加ckEditor表插件?

时间:2013-10-24 09:12:35

标签: javascript ckeditor

我从ckEditor下载了代码但是如何添加插件?到目前为止,我已将其添加到插件文件夹中,但如何配置它以便使用它。

这是我的配置设置。我不确定如何添加按钮?

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

config.extraPlugins = 'insertpre,format,justify,maximize,sourcearea';

1 个答案:

答案 0 :(得分:3)

您只需将Table添加到config.toolbar,例如:

config.toolbar = [
    { name: 'insert', items: [ 'Table' ] }
];
....

它将显示编辑器中的表格按钮