Hi i'm trying to host the ckeditor files on my content delivery network (CDN). Everything works fine but i have the following plugin. When i click OK i get an "Access Is Denied" error message. I'm assuming the "this._.editor.insertHtml" bit is causing the issue but i'm not sure how to fix it. Below is my plugin.js file:
I'd appreciate it if someone could help. Thanks
(function() {
CKEDITOR.plugins.add('imagemanager', {
requires : ['iframedialog'],
init : function(editor) {
var iframeWindow = null;
var me = this;
CKEDITOR.dialog.add('imagemanager_dialog', function() {
return {
title : 'Image Properties',
minWidth : 550,
minHeight : 320,
contents : [{
id : 'iframe',
label : 'Insert Image',
expand : true,
elements : [{
type : 'iframe',
src : me.path + 'dialogs/imagemanager.html',
width : '100%',
height : 320,
onContentLoad : function() {
// Set the iframe window
iframeWindow = document.getElementById(this._.frameId).contentWindow;
// Try and get the current selected element
var selection = editor.getSelection();
var element = selection != null ? selection.getSelectedElement() : null;
// If an image is selected then set the appropriate values
if (element != null && element.getName() == 'img') {
iframeWindow.document.getElementById('url').value = element.getAttribute('src');
}
}
}]
}],
onOk : function() {
this._.editor.insertHtml('<img src="' + iframeWindow.document.getElementById('url').value + '" alt="" />');
}
};
});
editor.addCommand('imagemanager', new CKEDITOR.dialogCommand('imagemanager_dialog'));
editor.ui.addButton('ImageManager', {
label : 'Insert Image',
command : 'imagemanager',
icon : this.path + 'images/icon.gif'
});
}
});
})();I'd appreciate it if someone could help. Thanks

Re: CKEditor CDN Plugin Issue
Re: CKEditor CDN Plugin Issue
var hr = new CKEDITOR.dom.element('hr', editor.document );
editor.insertElement(hr);
Within my onOk function but this chucks a null reference exception. I'm almost at the point of giving up with CKEditor as the support is terrible.
Re: CKEditor CDN Plugin Issue
Re: CKEditor CDN Plugin Issue
Re: CKEditor CDN Plugin Issue
The source of the horizontal rule plugin is quite easy to modify in order to perform some tests:
(function() { var horizontalruleCmd = { canUndo : false, // The undo snapshot will be handled by 'insertElement'. exec : function( editor ) { editor.insertElement( editor.document.createElement( 'hr' ) ); } }; var pluginName = 'horizontalrule'; // Register a plugin named "horizontalrule". CKEDITOR.plugins.add( pluginName, { init : function( editor ) { editor.addCommand( pluginName, horizontalruleCmd ); editor.ui.addButton( 'HorizontalRule', { label : editor.lang.horizontalrule, command : pluginName }); } }); })();Re: CKEditor CDN Plugin Issue
CKEDITOR.dialog.add('imagemanager_dialog', function() {Should have said:CKEDITOR.dialog.add('imagemanager_dialog', function(editor) {Now the editor instance gets passed in and you can say editor.insertHtml('...').