3
我有一個標準安裝(如樣品):如何配置CKEditor-4內聯編輯器?
<meta charset="utf-8"></meta>
<script src="../ckeditor.js"></script>
隨着HTML內容與許多<div contenteditable="true">
塊。我需要通過本地或外部configTypeX.js
文件配置每個編輯,
<script>
CKEDITOR.on('instanceCreated', function(event) {
var editor = event.editor, element = editor.element;
if (element.is('h1', 'h2', 'h3')) {
editor.on('configLoaded', function() {
editor.config.toolbar = [
[ 'Source', '-', 'Bold', 'Italic' ]
]; // BUG: about "Source"?? NOT AT INTERFACE!
});
} else {
// WHERE PUT THIS ITEM?
customConfig: 'configType2.js';
}
});
</script>
所以,我的問題是
- 如何做到在這種情況下一個
customConfig
? - 哪裏的「最好的完整文檔」,關於配置菜單(
editor.config.toolbar
)沒有在線配置工具,在那裏我可以理解如何使用正確的名稱來放置和刪除菜單itens? Here沒有關於如何解決完整安裝中的「源代碼」錯誤。
我這樣做,
git clone git://github.com/ckeditor/ckeditor-releases.git
cd ckeditor-releases
cp samples/inlineall.html samples/myinline.html
和編輯samples/myinline.html
與上面的代碼。
非常感謝,你是CKEditor的人!我和測試,並會在稍後回來。 –