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的人!我和测试,并会在稍后回来。 –