2016-01-11 68 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示例的源代碼 - 只需向下滾動到「獲取示例源代碼」即可查看經典和內嵌編輯器的工作示例。