首页 文章

Ckeditor - 共享工具栏不起作用

提问于
浏览
0

我使用Ckeditor的共享空间插件为多个ckeditor加载共享工具栏,但它仍然为所有编辑器加载单独的工具栏 .

这是我正在使用的代码的小提琴:https://jsfiddle.net/7Lrcup3L/

HTML:

<div id="topSpace"></div>
<textarea id="editor1" name="editor1"></textarea>
<textarea id="editor2" name="editor2"></textarea>
<div id="bottomSpace"></div>

JS:
CKEDITOR.replace('editor1',{
   sharedSpaces: {
     top: 'topSpace',
     bottom: 'bottomSpace'
   } 
 })
 CKEDITOR.replace('editor2',{
   sharedSpaces: {
     top: 'topSpace',
     bottom: 'bottomSpace'
   }
 })

需要帮助!

1 回答

  • 0

    Shared Space是标准预设中未包含的可选插件 . 您应该首先将其添加到您的构建中和/或使用config.extraPlugins启用 .

    检查Shared Toolbar and Bottom Bar SDK示例的源代码 - 只需向下滚动到"Get Sample Source Code"即可查看经典和内联编辑器的工作示例 .

相关问题