CKEditor 4 Documentation

CKEDITOR.ui.dialog.select

Hierarchy

CKEDITOR.ui.dialog.uiElement
CKEDITOR.ui.dialog.select

Files

A select box.

Defined By

Properties

The event processor list used by getInputElement at UI element instantiation. ...

The event processor list used by getInputElement at UI element instantiation. The default list defines three on* events:

  1. onLoad - Called when the element's parent dialog opens for the first time.
  2. onShow - Called whenever the element's parent dialog opens.
  3. onHide - Called whenever the element's parent dialog closes.

    // This connects the 'click' event in CKEDITOR.ui.dialog.button to onClick // handlers in the UI element's definitions. CKEDITOR.ui.dialog.button.eventProcessors = CKEDITOR.tools.extend( {}, CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors, { onClick : function( dialog, func ) { this.on( 'click', func ); } }, true );

Defined By

Methods

CKEDITOR.ui.dialog.select
view source
new( dialog, elementDefinition, htmlList ) : CKEDITOR.ui.dialog.select
Creates a button class instance. ...

Creates a button class instance.

Parameters

  • dialog : CKEDITOR.dialog

    Parent dialog window object.

  • elementDefinition : CKEDITOR.dialog.definition.uiElement

    The element definition. Accepted fields:

    • default (Required) The default value.
    • validate (Optional) The validation function.
    • items (Required) An array of options. Each option is a one- or two-item array of format [ 'Description', 'Value' ]. If 'Value' is missing, then the value would be assumed to be the same as the description.
    • multiple (Optional) Set this to true if you would like to have a multiple-choice select box.
    • size (Optional) The number of items to display in the select box.
  • htmlList : Array

    List of HTML code to output to.

Returns

Overrides: CKEDITOR.ui.dialog.uiElement.constructor

The default handler for a UI element's access key down event, which tries to put focus to the UI element. ...

The default handler for a UI element's access key down event, which tries to put focus to the UI element.

Can be overridded in child classes for more sophisticaed behavior.

Parameters

  • dialog : CKEDITOR.dialog

    The parent dialog object.

  • key : String

    The key combination pressed. Since access keys are defined to always include the CTRL key, its value should always include a 'CTRL+' prefix.

The default handler for a UI element's access key up event, which does nothing. ...

The default handler for a UI element's access key up event, which does nothing.

Can be overridded in child classes for more sophisticated behavior.

Parameters

  • dialog : CKEDITOR.dialog

    The parent dialog object.

  • key : String

    The key combination pressed. Since access keys are defined to always include the CTRL key, its value should always include a 'CTRL+' prefix.

CKEDITOR.ui.dialog.select
view source
( label, [value], [index] ) : CKEDITOR.ui.dialog.selectchainable
Adds an option to the select box. ...

Adds an option to the select box.

Parameters

  • label : String

    Option label.

  • value : String (optional)

    Option value, if not defined it will be assumed to be the same as the label.

  • index : Number (optional)

    Position of the option to be inserted to. If not defined, the new option will be inserted to the end of list.

Returns

CKEDITOR.ui.dialog.select
view source
( ) : CKEDITOR.ui.dialog.selectchainable
Clears all options out of the selection list. ...

Clears all options out of the selection list.

Returns

Disables a UI element. ...

Disables a UI element.

Enables a UI element. ...

Enables a UI element.

Puts the focus to the UI object. ...

Puts the focus to the UI object. Switches tabs if the UI object isn't in the active tab page.

uiElement.focus();

Returns

Gets the parent dialog object containing this UI element. ...

Gets the parent dialog object containing this UI element.

var dialog = uiElement.getDialog();

Returns

Gets the root DOM element of this dialog UI object. ...

Gets the root DOM element of this dialog UI object.

uiElement.getElement().hide();

Returns

CKEDITOR.ui.dialog.select
view source
( ) : CKEDITOR.dom.element
Gets the DOM element of the select box. ...

Gets the DOM element of the select box.

Returns

Overrides: CKEDITOR.ui.dialog.uiElement.getInputElement

Gets the current value of this dialog UI object. ...

Gets the current value of this dialog UI object.

var myValue = uiElement.getValue();

Returns

  • Object

    The current value.

Tells whether the UI object's value has changed. ...

Tells whether the UI object's value has changed.

if ( uiElement.isChanged() )
    confirm( 'Value changed! Continue?' );

Returns

  • Boolean

    true if changed, false if not changed.

Determines whether an UI element is enabled or not. ...

Determines whether an UI element is enabled or not.

Returns

  • Boolean

    Whether the UI element is enabled.

Determines whether an UI element is focus-able or not. ...

Determines whether an UI element is focus-able or not. Focus-able is defined as being both visible and enabled.

Returns

  • Boolean

    Whether the UI element can be focused.

Determines whether an UI element is visible or not. ...

Determines whether an UI element is visible or not.

Returns

  • Boolean

    Whether the UI element is visible.

Registers the on* event handlers defined in the element definition. ...

Registers the on* event handlers defined in the element definition.

The default behavior of this function is:

  1. If the on* event is defined in the class's eventProcesors list, then the registration is delegated to the corresponding function in the eventProcessors list.
  2. If the on* event is not defined in the eventProcessors list, then register the event handler under the corresponding DOM event of the UI element's input DOM element (as defined by the return value of getInputElement).

This function is only called at UI element instantiation, but can be overridded in child classes if they require more flexibility.

Parameters

Returns

CKEDITOR.ui.dialog.select
view source
( index ) : CKEDITOR.ui.dialog.selectchainable
Removes an option from the selection list. ...

Removes an option from the selection list.

Parameters

  • index : Number

    Index of the option to be removed.

Returns

Selects the parent tab of this element. ...

Selects the parent tab of this element. Usually called by focus() or overridden focus() methods.

focus : function() {
    this.selectParentTab();
    // do something else.
}

Returns

Sets the value of this dialog UI object. ...

Sets the value of this dialog UI object.

uiElement.setValue( 'Dingo' );

Parameters

  • value : Object

    The new value.

  • noChangeEvent : Boolean

    Internal commit, to supress change event on this element.

Returns

Defined By

Events

Fired when the value of the uiElement is changed. ...

Fired when the value of the uiElement is changed.

Parameters