Report an issue
Class

CKEDITOR.dialog.definition.select

class inherited

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