public/ckeditor/4.4dev/plugins/dialog/plugin.js
function( name, dialogDefinition ) {
			// Avoid path registration from multiple instances override definition.
			if ( !this._.dialogDefinitions[ name ] || typeof dialogDefinition == 'function' )
				this._.dialogDefinitions[ name ] = dialogDefinition;
		}
function( name, dialogDefinition ) {
			// Avoid path registration from multiple instances override definition.
			if ( !this._.dialogDefinitions[ name ] || typeof dialogDefinition == 'function' )
				this._.dialogDefinitions[ name ] = dialogDefinition;
		}
function ( name , dialogDefinition ) { // Avoid path registration from multiple instances override definition.
 if ( ! this . _ . dialogDefinitions [ name ] || typeof dialogDefinition == 'function' ) this . _ . dialogDefinitions [ name ] = dialogDefinition ; }
Registers a dialog.

// Full sample plugin, which does not only register a dialog window but also adds an item to the context menu.
// To open the dialog window, choose "Open dialog" in the context menu.
CKEDITOR.plugins.add( 'myplugin', {
init: function( editor ) {
editor.addCommand( 'mydialog',new CKEDITOR.dialogCommand( 'mydialog' ) );

if ( editor.contextMenu ) {
editor.addMenuGroup( 'mygroup', 10 );
editor.addMenuItem( 'My Dialog', {
label: 'Open dialog',
command: 'mydialog',
group: 'mygroup'
} );
editor.contextMenu.addListener( function( element ) {
return { 'My Dialog': CKEDITOR.TRISTATE_OFF };
} );
}

CKEDITOR.dialog.add( 'mydialog', function( api ) {
// CKEDITOR.dialog.definition
var dialogDefinition = {
title: 'Sample dialog',
minWidth: 390,
minHeight: 130,
contents: [
{
id: 'tab1',
label: 'Label',
title: 'Title',
expand: true,
padding: 0,
elements: [
{
type: 'html',
html: '<p>This is some sample HTML content.</p>'
},
{
type: 'textarea',
id: 'textareaId',
rows: 4,
cols: 40
}
]
}
],
buttons: [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ],
onOk: function() {
// "this" is now a CKEDITOR.dialog object.
// Accessing dialog elements:
var textareaObj = this.getContentElement( 'tab1', 'textareaId' );
alert( "You have entered: " + textareaObj.getValue() );
}
};

return dialogDefinition;
} );
}
} );

CKEDITOR.replace( 'editor1', { extraPlugins: 'myplugin' } );

@static
@param {String} name The dialog's name.
@param {Function/String} dialogDefinition
A function returning the dialog's definition, or the URL to the `.js` file holding the function.
The function should accept an argument `editor` which is the current editor instance, and
return an object conforming to {@link CKEDITOR.dialog.definition}.
@see CKEDITOR.dialog.definition
Registers a dialog .