更改ckeditor iframe对话框网址 [英] change ckeditor iframe dialog url
本文介绍了更改ckeditor iframe对话框网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发一个ckeditor插件。我有一个像这样的iframe对话框:
I'm developing a ckeditor plugin. I have a iframe dialog like this:
CKEDITOR.dialog.add( 'imageDialog', function ()
{
return {
title : 'add image',
minWidth : 700,
minHeight : 360,
contents :
[
{
id : 'iframe',
label : 'Lien',
expand : true,
elements :
[
{
type : 'iframe',
src : 'index.php',
width : '100%',
height : '100%',
onContentLoad : function() {
}
}
]
}
],
buttons: {disabled:true}
};
} );
,我想在每次打开对话框时更改src url。我如何做到这一点?
and I want to change the src url each time the dialog opens. How can I do this?
推荐答案
我成功地做了我想要的!我在对话框中添加了一个onShow函数,其中包含:
I succeeded to do what I want! I added a onShow function to my dialog, containing:
this.definition.getContents('iframe').elements[0].src = iframeurl;
这篇关于更改ckeditor iframe对话框网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文