Javascript 无法在iframe中获取CKEDITOR实例

Javascript 无法在iframe中获取CKEDITOR实例,javascript,jquery,html,iframe,ckeditor,Javascript,Jquery,Html,Iframe,Ckeditor,假设我有一个带有iframe的页面,在iframe中我有一些ckeditor内联实例,我想从包含该实例的页面管理这些实例 如果我跑的话,从父母那里 console.log(document.getElementById("iframe_id").contentWindow.CKEDITOR); console.log(document.getElementById("iframe_id").contentWindow.CKEDITOR.instances); 我有CKEDITOR对象,但不知

假设我有一个带有iframe的页面,在iframe中我有一些ckeditor内联实例,我想从包含该实例的页面管理这些实例

如果我跑的话,从父母那里

console.log(document.getElementById("iframe_id").contentWindow.CKEDITOR);
console.log(document.getElementById("iframe_id").contentWindow.CKEDITOR.instances);
我有CKEDITOR对象,但不知道为什么,如果我运行

console.log(document.getElementById("iframe_id").contentWindow.CKEDITOR);
console.log(document.getElementById("iframe_id").contentWindow.CKEDITOR.instances);
我得到一个未定义的结果

有什么想法吗

后期编辑:如果我直接在inspector中运行最后一个console.log,我会正常获得所有实例,问题似乎只存在于父页面js中