2016-01-11 69 views
0

我使用Ckeditor的共享空间插件为多个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' 
    } 
}) 

需要用同样的帮助!

回答

0

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

检查Shared Toolbar and Bottom Bar SDK示例的源代码 - 只需向下滚动到“获取示例源代码”即可查看经典和内嵌编辑器的工作示例。