大家好,我的屏幕上有一个 CKeditor ckeditor 正在显示,但是当我尝试获取编辑器的实例时,我的值为 null 或 undefined 如何获取 ckeditor 实例,任何人都可以在这里帮助我
function editor() {
//i have null here
for (name in CKEDITOR.instances) {
CKEDITOR.instances[name].destroy()
}
var editor = CKEDITOR.instances.editor1;//i have null here
editor.on('key', function () {
var data = editor.getData();
});
}
$(document).ready(function () {
var editorShort = CKEDITOR.editor.replace('popup_editor1');
editor();
});