Как отметил Денис Воловик, этого можно достичь с помощью Iframe с внешней страницей.Это именно то, что я сделал некоторое время назад, чтобы решить мою проблему.Извиняюсь за то, что только опубликовал это сейчас, но вот некоторый скелетный код того, как я достиг этого:
function iframeDialog(editor) {
return {
title : 'someTitle',
minWidth : 820,
minHeight : 100,
maxHeight: 200,
contents :
[
{
id : 'someTab',
label : '',
expand : true,
elements :
[
{
id : 'myIframe',
type : 'iframe',
src : 'my_dialog_contents.html',
width : '100%',
height : 200,
onContentLoad : function() {
//...
var iframe = document.getElementById(this._.frameId);
iframeWindow = iframe.contentWindow;
// can now call methods in the iframe window
}
}
]
}
],
onShow : function() {
// check if should display dialog, do dialog.hide if not
},
onOk : function()
{
var myIframe = this.getContentElement('someTab', 'myIframe');
var iframeWindow = document.getElementById(myIframe.domId).contentWindow;
var iframeDocument = iframeWindow.document;
// can now interrogate values in the iframe, call javascript methods
// can also call editor methods, e.g. editor.focus(), editor.getSelection(),
}
};
}
CKEDITOR.dialog.add( 'mydialog', function( editor )
{
return iframeDialog(iframeDialog);
} );