如何添加 ckEditor 表插件

How can I add the ckEditor table plugin?

本文关键字:ckEditor 插件 添加 何添加      更新时间:2023-09-26

我从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';
你可以将

Table添加到你的config.toolbar中,比如:

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

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