﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5143	CKEDITOR.currentInstance.openDialog('your-custom-dialogue'); Does not work in Opera	Tony		"Opera 10, using CKEDITOR.currentInstance.openDialog('your-custom-dialogue'); in plugin.js as :
an editor.addCommand
doesn't work in Opera but does in Firefox. May crap out other browsers too?

I had to do an :
alert( CKEDITOR.currentInstance.name );
just to get the current instance name instead. In opera that fails on the first click of the plugin's toobar icon but works on the second, same as above.

The code was :


{{{
CKEDITOR.plugins.add( 'custom',
{

	requires: ['iframedialog'],
	lang : [ 'en' ],

	init : function( editor )
	{

		var pluginName = 'custom';

		/* Register the dialog. */
		CKEDITOR.dialog.addIframe('your-custom-dialogue', 'your custom dialogue',this.path + 'dialogs/dialog.php',500,300,function(){ /* oniframeload */ })
		/* Register the command. */
		var command =  editor.addCommand('custom', {exec:customWindow});

		command;
		command.modes = { wysiwyg:1, source:1 };
		command.canUndo = false;

		/* Set the language and the command */
		editor.ui.addButton( 'custom',
			{
				label : editor.lang.langCustom.label,
				command : pluginName
			});

	},

})

function customWindow() {
    /* run when custom button is clicked */
    CKEDITOR.currentInstance.openDialog('your-custom-dialogue')

}

}}}
message: Cannot convert undefined or null to Object.

Using :

{{{
function customWindow() {
    /* run when custom button is clicked */
    CKEDITOR.instances.content.openDialog('your-custom-dialogue')

}
}}}

instead works as expected."	Bug	closed	Normal		General	SVN (CKEditor) - OLD	invalid		Hallvord R. M. Steen (Opera Software)
