2012-04-17 86 views
1

我在我的網站上使用了最新版本的CKEditor(CKEditor 3.6.3,於2012年4月17日發佈)。CKEditor,IE9和JavaScript

它在Firefox,Chrome和IE9中完美工作,無需任何修改。

它完美的Firefox和Chrome時,我自定義工具欄,但後來我收到以下錯誤信息(我把它翻譯)在IE9:

"SCRIPT5007: Cannot retrieve the value of property length, the object is null or undefined. 
ckeditor.js, line 11101 token 21" 

這就是下面這行:

var w=o.toolbox.toolbars,x=o.config.toolbar instanceof Array ? o.config.toolbar : o.config['toolbar_'+o.config.toolbar]; 
    for(var y=0;y<x.length;y++){ 

因此,在IE9中變量x不是Array:我試過IE7,8和9各種模式都有相同的錯誤。

它似乎IE9也是不執行以下行唯一的瀏覽器:

CKEDITOR.editorConfig = function(config) {} 

就是這熟悉的問題(如果是這樣,我怎麼能解決這個問題),或者是它的一個bug CKEditor的?

+0

歡迎來到SO,看看[Markdown help](http://stackoverflow.com/editing-help)以獲得更好的問題格式。 – 2012-04-17 13:16:05

回答

0

如果您的配置有語法錯誤,例如尾隨逗號。