2015-05-15 13 views
5

की संपत्ति 'checkFeature' पढ़ा नहीं जा सकता मैं (संस्करण 4.4.7) CKeditor का एक उदाहरण नष्ट करने के लिए निम्नलिखित कोड का उपयोग कर रहा:CKeditor नष्ट() फेंकता Uncaught TypeError: अपरिभाषित

var ck = CKEDITOR.inline(iElm[0],options); 
ck.on("blur",function() { 
    this.destroy(true); 
}); 

कोड ठीक चलता है, उदाहरण डीओएम से हटा दिया गया है, लेकिन निम्न त्रुटि की सूचना दी गई है:

Uncaught TypeError: Cannot read property 'checkFeature' of undefined 
checkAllowed @ ckeditor.js:178 
refresh @ ckeditor.js:177 
c @ ckeditor.js:920 
j @ ckeditor.js:10 
CKEDITOR.event.CKEDITOR.event.fire @ ckeditor.js:12 
CKEDITOR.editor.CKEDITOR.editor.fire @ ckeditor.js:13 
f @ ckeditor.js:215 
(anonymous function) @ ckeditor.js:215 
(anonymous function) @ ckeditor.js:25 

कोई विचार क्या मैं गलत तरीके से कर रहा हूं?

+0

@ user1273587 मैं नवीनतम सीकेएडिटर में पुन: पेश नहीं कर सकता। https://gist.github.com/anonymous/b947d1e5444b7eb6d39ade715ebd0a26 –

उत्तर

1

मैंने पाया कि त्रुटि संदेश का सफाया कर दिया है:

var ck = CKEDITOR.inline(iElm[0],options); 
    ck.on("blur",function() { 
    var editor=ck.name; 
    $timeout(function() { 
     CKEDITOR.instances[editor].destroy(); 
    },0); 
}); 
0

खैर, संपादक सिर्फ खाली div तत्व है कि हम संपादक पकड़ करने के लिए उपयोग किया है। तो, क्या यह बल्लेबाज है:

CKEDITOR.instances.editor.removeAllListeners(); 
संबंधित मुद्दे