CKEDITOR.dialog.definition.select
The definition of a select element.
This class is not really part of the API. It just illustrates the properties that developers can use to define and create select elements.
Once the dialog is opened, the created element becomes a CKEDITOR.ui.dialog.select object and can be accessed with CKEDITOR.dialog.getContentElement.
For a complete example of dialog definition, please check CKEDITOR.dialog.add.
// There is no constructor for this class, the user just has to define an
// object with the appropriate properties.
// Example:
{
type: 'select',
id: 'sport',
label: 'Select your favourite sport',
items: [ [ 'Basketball' ], [ 'Baseball' ], [ 'Hockey' ], [ 'Football' ] ],
'default': 'Football',
onChange: function( api ) {
// this = CKEDITOR.ui.dialog.select
alert( 'Current value: ' + this.getValue() );
}
}
Filtering
Properties
align : StringCKEDITOR.dialog.definition.select#alignHorizontal alignment (in the container) of the UI element.
className : StringCKEDITOR.dialog.definition.select#classNameCSS class names to append to the UI element.
commit : FunctionCKEDITOR.dialog.definition.select#commitFunction to execute whenever the UI element's parent dialog's CKEDITOR.dialog.commitContent method is executed. It usually takes care of the respective UI element as a standalone element.
-
Specify the inline style of the input element container.
{ type: 'text', label: 'My Label', controlStyle: 'width: 3em' } default : StringCKEDITOR.dialog.definition.select#defaultThe default value.
id : StringCKEDITOR.dialog.definition.select#idThe ID of the UI element.
-
Specify the inline style of the input element.
{ type: 'text', label: 'My Label', inputStyle: 'text-align: center' } items : ArrayCKEDITOR.dialog.definition.select#itemsAn array of options. Each option is a 1- or 2-item array of format
[ 'Description', 'Value' ]. If'Value'is missing, then the value would be assumed to be the same as the description.label : StringCKEDITOR.dialog.definition.select#labellabelLayout : StringCKEDITOR.dialog.definition.select#labelLayout(Optional) Specify the layout of the label. Set to
'horizontal'for horizontal layout. The default layout is vertical.{ type: 'text', label: 'My Label', labelLayout: 'horizontal' }labelStyle : StringCKEDITOR.dialog.definition.select#labelStyleSpecify the inline style of the uiElement label.
{ type: 'text', label: 'My Label', labelStyle: 'color: red' }multiple : BooleanCKEDITOR.dialog.definition.select#multiple(Optional) Set this to true if you'd like to have a multiple-choice select box.
Defaults to
falseonHide : FunctionCKEDITOR.dialog.definition.select#onHideFunction to execute whenever the UI element's parent dialog is closed.
onLoad : FunctionCKEDITOR.dialog.definition.select#onLoadFunction to execute the first time the UI element is displayed.
onShow : FunctionCKEDITOR.dialog.definition.select#onShowFunction to execute whenever the UI element's parent dialog is displayed.
requiredContent : String | Object | styleCKEDITOR.dialog.definition.select#requiredContentThe content that needs to be allowed to enable this UI element. All formats accepted by CKEDITOR.filter.check may be used.
When all UI elements in a tab are disabled, this tab will be disabled automatically.
setup : FunctionCKEDITOR.dialog.definition.select#setupFunction to execute whenever the UI element's parent dialog's CKEDITOR.dialog.setupContent method is executed. It usually takes care of the respective UI element as a standalone element.
size : NumberCKEDITOR.dialog.definition.select#size(Optional) The number of items to display in the select box.
style : StringCKEDITOR.dialog.definition.select#styleInline CSS classes to append to the UI element.
title : StringCKEDITOR.dialog.definition.select#titleThe popup label of the UI element.
type : StringCKEDITOR.dialog.definition.select#typeThe type of the UI element. Required.
validate : FunctionCKEDITOR.dialog.definition.select#validate(Optional) The validation function.
widths : ArrayCKEDITOR.dialog.definition.select#widths(Optional) Applies only to horizontal layouts: a two elements array of lengths to specify the widths of the label and the content element. See also labelLayout.
{ type: 'text', label: 'My Label', labelLayout: 'horizontal', widths: [100, 200] }