2
我有一个需要内嵌CKEditor但没有工具栏的应用程序。对于内嵌CKEditor的一部分,我有:如何在CKEditor中嵌入工具栏
CKEDITOR.disableAutoInline = true;
var editor = CKEDITOR.inline('editable', {on: {
instanceReady: function() {periodic();}
}});
var periodic = (function() {
var data, oldData;
return function() {
if ((data = editor.getData()) !== oldData) {
oldData = data;
$.post("update.php", {txt:data});
}
setTimeout(periodic, 1000);
};
})();
然后在工具栏的隐藏部分,我发现这个:CKEditor 4 Inline: How to hide toolbar on demand?
//Whenever CKEditor loses focus, We will hide the corresponding toolbar DIV.
function hideToolBarDiv(event) {
// Select the correct toolbar DIV and hide it.
//'event.editor.name' returns the name of the DIV receiving focus.
$('#'+event.editor.name+'TBdiv').hide();
}
问题是,我不知道如何将这两个结合在一起:)我欣赏任何提示。谢谢。
可能重复[我可以使用没有工具栏的CKEditor?](http://stackoverflow.com/questions/13611386/can-i-use-ckeditor-without-a-toolbar) – Reinmar
我更新了我的答案在http://stackoverflow.com/ questions/13611386/can-i-use-ckeditor-without-a-toolbar解释高级内容过滤器没有配置没有工具栏,因此您需要手动执行此操作。 – Reinmar