使用ckeditor 4.4.7,我不断收到以下错误......是否有任何想法需要修复?
Cannot read property 'getDirection' of undefined
Cannot read property 'allow' of undefined
我正在使用CKEDITOR.inline(DIVid,config)来创建修改的编辑器 具有contenteditable ='true'属性的DIV
答案 0 :(得分:1)
你可以试试这个:
<div id="editor1" contenteditable="true">
<h1>Inline Editing in Action!</h1>
<p>The "div" element that contains this text is now editable.
</div>
或者这个:
<div id="editor1" contenteditable="true">
<h1>Inline Editing in Action!</h1>
<p>The "div" element that contains this text is now editable.
</div>
<script>
// Turn off automatic editor creation first.
CKEDITOR.disableAutoInline = true;
CKEDITOR.inline( 'editor1' );
</script>
希望对您有所帮助。如果他们没有,那么在调用事件之前确保div在页面上(document.ready())并确保在对CKEDITOR进行任何调用之前加载了所有脚本。