2013-04-15 146 views
4

我下載了最新的CKEditor和嘗試以下操作:CKEditor內嵌編輯 - 內容不可編輯?

<html> 
<head> 
<script src="ckeditor/ckeditor.js"> 
</script> 
</head> 
<body> 
<div id="editor"> 
Some test text 
</div> 
<script> 
CKEDITOR.disableAutoInline = true; 

var editor = CKEDITOR.inline('editor'); 
</script> 
</body> 

它曾在這個意義上,我可以單擊div來使編輯器工具欄出現,但除了我似乎無法對內容進行編輯!大多數工具欄按鈕都被禁用,並且在該字段中輸入什麼也不做。 (見下面的截圖)

enter image description here

根據http://nightly.ckeditor.com/13-04-14-07-42/standard/samples/inlinebycode.html這應該是所有的JS,我需要。是否有一些其他配置設置我需要做的?

回答

5

Rawr,對不起。發佈此信息僅僅幾分鐘後我就找到了答案。我非常專注於尋找配置選項,我沒有意識到在示例中檢查div。

即使我沒有使用CKEDITOR.disableAutoInline,div仍然必須有contenteditable="true"