错误:Dialog.addIFrame不是函数
我试图为CKEditor 4.4创建一个插件 主要的想法是在工具栏上有一个按钮,当你点击它时,会出现一个对话框窗口,其中的内容是从另一个站点加载的 我认为Dialog.addIframe函数会有所帮助,并将其放入我的plugin.js中,如下所示:错误:Dialog.addIFrame不是函数,iframe,plugins,dialog,ckeditor,Iframe,Plugins,Dialog,Ckeditor,我试图为CKEditor 4.4创建一个插件 主要的想法是在工具栏上有一个按钮,当你点击它时,会出现一个对话框窗口,其中的内容是从另一个站点加载的 我认为Dialog.addIframe函数会有所帮助,并将其放入我的plugin.js中,如下所示: CKEDITOR.plugins.add( 'insertVariable', { icons: 'insertvariable', init: function( editor ) { for(e in CKEDITOR.dialo
CKEDITOR.plugins.add( 'insertVariable', {
icons: 'insertvariable',
init: function( editor ) {
for(e in CKEDITOR.dialog){
alert(e + " " + editor[e]);
}
alert(CKEDITOR.dialog.addIframe());
editor.addCommand( 'varDialog', new CKEDITOR.dialogCommand( 'varDialog' ) );
CKEDITOR.dialog.addIframe('varDialog','varDialog','http://www.cksource.com/',500,400);
editor.ui.addButton( 'insertVariable', {
label: 'Insert Variable',
command: 'varDialog',
icon: this.path + 'icons/InsertVariable.gif'
});
}
});
运行代码时,控制台中出现以下错误:
addiframe is not a function
我使用的是最新版本的CKEditor 4.4完整版,并且运行了Iframe插件。所有其他插件都工作正常,只有这个带有Iframe的插件会导致问题。问题已解决:我必须安装另一个插件:Iframe Dialog plugin。这件事谁也没提过。有了这个插件,我所有的对话框都应该显示出来如何?你是怎么安装的?