我有一个标准安装(如示例):
<meta charset="utf-8"></meta>
<script src="../ckeditor.js"></script>
带有许多<div contenteditable="true">
块的 HTML 内容。我需要通过本地或外部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
没有在线配置工具的配置菜单(),我可以在哪里理解如何放置和删除具有正确名称的菜单项? 这里没有关于如何在完整安装中修复“源”错误的信息。
我愿意,
git clone git://github.com/ckeditor/ckeditor-releases.git
cd ckeditor-releases
cp samples/inlineall.html samples/myinline.html
samples/myinline.html
并使用上面的代码进行编辑。