CKEDITOR.dialog.definitionObject
This class is not really part of the API. It is the definition property value passed to dialogDefinition event handlers.
CKEDITOR.on( 'dialogDefinition', function( evt ) {
var definition = evt.data.definition;
var content = definition.getContents( 'page1' );
// ...
} );
Filtering
Properties
buttons : ArrayCKEDITOR.dialog.definitionObject#buttonsThe buttons in the dialog, defined as an array of CKEDITOR.dialog.definition.button objects.
Defaults to
[ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ]contents : ArrayCKEDITOR.dialog.definitionObject#contentsThe contents in the dialog, defined as an array of CKEDITOR.dialog.definition.content objects. Required.
-
The initial height of the dialog, in pixels.
Defaults to
CKEDITOR.dialog.definition.minHeight minHeight : NumberCKEDITOR.dialog.definitionObject#minHeightminWidth : NumberCKEDITOR.dialog.definitionObject#minWidthonCancel : FunctionCKEDITOR.dialog.definitionObject#onCancelThe function to execute when the "Cancel" button is pressed.
onHide : FunctionCKEDITOR.dialog.definitionObject#onHideThe function executed every time the dialog is closed.
onLoad : FunctionCKEDITOR.dialog.definitionObject#onLoadThe function to execute when the dialog is displayed for the first time.
onOk : FunctionCKEDITOR.dialog.definitionObject#onOkThe function to execute when the "OK" button is pressed.
onShow : FunctionCKEDITOR.dialog.definitionObject#onShowThe function to execute when the dialog is loaded (executed every time the dialog is opened).
resizable : NumberCKEDITOR.dialog.definitionObject#resizableHow the dialog can be resized, must be one of the four contents defined below.
- CKEDITOR.DIALOG_RESIZE_NONE
- CKEDITOR.DIALOG_RESIZE_WIDTH
- CKEDITOR.DIALOG_RESIZE_HEIGHT
- CKEDITOR.DIALOG_RESIZE_BOTH
Defaults to
CKEDITOR.DIALOG_RESIZE_NONEtitle : StringCKEDITOR.dialog.definitionObject#titleThe dialog title, displayed in the dialog's header. Required.
-
The initial width of the dialog, in pixels.
Defaults to
CKEDITOR.dialog.definition#minWidth
Methods
constructor() → definitionObjectCKEDITOR.dialog.definitionObject#constructoraddButton( buttonDefinition, [ nextSiblingId ] ) → buttonCKEDITOR.dialog.definitionObject#addButtonAdds a button definition object under this dialog definition.
Parameters
buttonDefinition : buttonThe button definition.
[ nextSiblingId ] : StringThe id of an existing button definition which the new button definition will be inserted before. Omit if the new button definition is to be inserted as the last item.
Returns
buttonThe inserted button definition.
addContents( contentDefinition, [ nextSiblingId ] ) → contentCKEDITOR.dialog.definitionObject#addContentsAdds a content definition object under this dialog definition.
Parameters
contentDefinition : contentThe content definition.
[ nextSiblingId ] : StringThe id of an existing content definition which the new content definition will be inserted before. Omit if the new content definition is to be inserted as the last item.
Returns
contentThe inserted content definition.
getButton( id ) → buttonCKEDITOR.dialog.definitionObject#getButtonGets a button definition.
Parameters
id : StringThe id of the button definition.
Returns
buttonThe button definition matching id.
getContents( id ) → contentCKEDITOR.dialog.definitionObject#getContentsGets a content definition.
Parameters
id : StringThe id of the content definition.
Returns
contentThe content definition matching id.
-
Returns the current dialog mode based on the state of the feature used with this dialog.
See CKEDITOR.dialog.EDITING_MODE and CKEDITOR.dialog.CREATION_MODE.
Parameters
editor : editor
Returns
NumberDialog mode.
since 4.13.0
getModel( editor ) → element | widget | Object | nullCKEDITOR.dialog.definitionObject#getModelReturns the subject of the dialog.
For most plugins, like the
tableorlinkplugin, it should return a DOM element instance if there is an element related to the dialog. For widget plugins (image2,placeholder) it should return a CKEDITOR.plugins.widget instance that is the subject of this dialog.Parameters
editor : editor
Returns
element | widget | Object | nullReturns
nullif the dialog does not use the model.
removeButton( id ) → buttonCKEDITOR.dialog.definitionObject#removeButtonRemoves a button definition from the dialog definition.
Parameters
id : StringThe id of the button definition to be removed.
Returns
buttonThe removed button definition.
removeContents( id ) → contentCKEDITOR.dialog.definitionObject#removeContentsRemoves a content definition from this dialog definition.
Parameters
id : StringThe id of the content definition to be removed.
Returns
contentThe removed content definition.