Ember.js和CKEDITOR冲突:无法读取未定义的属性'type'

Arn*_*son 0 wysiwyg ckeditor ember.js

Ember.JS和CKEDITOR之间存在冲突.如果我使用Ember.js,工具栏(模态窗口)不起作用.如果我尝试按下例如粘贴按钮,那么我得到以下错误消息,窗口没有模态窗口.

Uncaught TypeError: Cannot read property 'type' of undefined
Run Code Online (Sandbox Code Playgroud)

ckeditor工具栏无法正常工作

如果我删除Ember.Js,那么CKeditor工作正常.

在jsfiddle上查看问题的现场演示 http://jsfiddle.net/HEhMq/13/

这就是我将CKEDITOR嵌入到我的ember模板中的方法:

App.HTMLTextArea = Ember.TextArea.extend({
    didInsertElement: function() {
        this._super();
        var self = this;
        var elementId = self.get('elementId');

        var edit = CKEDITOR.replace( elementId, {
            extraPlugins : 'autogrow',
            autoGrow_maxHeight : 800,
            // Remove the Resize plugin as it does not make sense to use it in conjunction with the AutoGrow plugin.
            removePlugins : 'resize'
        });

        edit.on('blur', function(e) {
                if (e.editor.checkDirty()) {
                        self.set('value', edit.getData() );
                }
        });
    }
});
Run Code Online (Sandbox Code Playgroud)

使用此代码,编辑器可以正常加载,并更新Ember值.只是工具栏按钮不起作用.

有人有同样的问题吗?

Rei*_*mar 5

幸运的是,事实证明我们已经解决了这个问题:http://dev.ckeditor.com/ticket/10265我们在几天前做到了这一点,计划在下周进行的新版本(4.1.1)将包含这个补丁.实际上,CKEditor repo上的master已经被冻结了,所以你可以使用它,因为它不太可能会发生变化.