我有一个标准安装(比如示例):
<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。
发布于 2013-08-25 16:31:17
Source按钮是隐藏的,因为除了wysiwyg之外,不可能有不同的模式。因此,为那些编辑器创建了新的插件- 源对话,但默认情况下它不包括在任何一个构建中。您可以使用这个插件使用在线CKBuilder或使用带有all参数的一个预设来构建编辑器。例如:./build.sh full all。还记得要加载sourcedialog插件(使用config.extraPlugins = 'sourcedialog')。CKEDITOR.inline():
//我们需要首先关闭自动编辑器创建。CKEDITOR.disableAutoInline = true;CKEDITOR.inline(‘editable1 1’,{ customConfig:'editableConfig.js‘} );CKEDITOR.inline(’editable1 1‘,{工具栏:.} );https://stackoverflow.com/questions/18429541
复制相似问题