在CKEditor 4中,我们可以使用以下配置来添加其他插件。我们如何在ckeditor 5中实现它?
toolbar: [
{ name: 'document', items: ['Source', '-', 'DocProps', 'Preview', 'Print', '-', 'Templates'] },
{ name: 'clipboard', items: ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'] },
{ name: 'editing', items: ['Find', 'Replace', '-', 'SelectAll', '-', 'SpellChecker', 'Scayt'] },
{ name: 'tools', items: ['Maximize', 'ShowBlocks', '-', ] },
'/',
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat'] },
{ name: 'colors', items: ['TextColor', 'BGColor'] },
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent',
'-', 'Blockquote', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl'] },
'/',
{ name: 'links', items: ['Link', 'Unlink', 'Anchor'] },
{ name: 'styles', items: ['Styles', 'Format', 'Font', 'FontSize'] }
]
谢谢。
答案 0 :(得分:0)
那实际上是不正确的。在CKEditor 4中,使用extraPlugins设置添加新插件。上面显示的是toolbar配置,您可以在此处了解更多信息:https://ckeditor.com/docs/ckeditor4/latest/guide/dev_toolbarconcepts.html。
如果您想向CKEditor 5添加新的插件,请参见:https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/installing-plugins.html#adding-a-plugin-to-a-build和https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editorconfig-EditorConfig.html#member-plugins。
如果要在CKEditor 5中配置工具栏并向其中添加新按钮,请参阅:https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/configuration.html#toolbar-setup和https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editorconfig-EditorConfig.html#member-toolbar。