我正在开发一个 ckeditor 插件。我有一个像这样的 iframe 对话框:
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。我怎样才能做到这一点?
最佳答案
我成功地做了我想做的事!我在对话框中添加了一个 onShow 函数,其中包含:
this.definition.getContents('iframe').elements[0].src = iframeurl;
关于javascript - 更改 ckeditor iframe 对话框 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12621681/