CKEDITOR - 无法调用未定义的"getSelection"

tho*_*ron 9 ajax ckeditor

我正在尝试在我的网站上添加CKEDITOR 4.2(使用Chrome 29和Firefox 23测试),ckeditor.jshead部分中加载,textarea加载到ajax中,然后替换为:

CKEDITOR.replace('editor');
Run Code Online (Sandbox Code Playgroud)

但之后我无法在文本字段中写入,当我单击任何按钮时,会出现错误 Cannot call method 'getSelection' of undefined

CKEDITOR.dom.selection = function (a) {
    var b = a instanceof CKEDITOR.dom.element;
    this.document = a instanceof CKEDITOR.dom.document ? a : a.getDocument();
    this.root = a = b ? a : this.document.getBody();
    this.isLocked = 0;
    this._ = {
        cache: {}
    };
    b = o ? this.document.$.selection : this.document.getWindow().$.getSelection(); // Error
    // ...
}
Run Code Online (Sandbox Code Playgroud)

它正在一个空页面上工作,没有ajax但不在网站上,可能是与其他脚本冲突?

任何的想法 ?