CKeditor instance is null or undefined?-Collection of common programming errors
It could be that the instances variable is simply undefined at that time. Depending on what you really want to do with the editor, I suggest that you do the on key bindings and other such things inside instanceReady, which is a CKEditor event.
$(document).ready(function () {
// You can define it before replacing the editor
CKEDITOR.on('instanceReady', function(evt){
// Do your bindings and other actions here for example
// You can access each editor that this event has fired on from the event
var editor = evt.editor;
});
// replace editor
var editorShort = CKEDITOR.editor.replace('popup_editor1');
});
See the documentation at http://docs.ckeditor.com/#!/api/CKEDITOR-event-instanceReady
Originally posted 2013-11-09 19:45:42.