# CKEditor 3.0 JavaScript API Documentation

Code Index | File Index

## Namespaces

- CKEDITOR
- CKEDITOR.ajax
- CKEDITOR.config
- CKEDITOR.dom
- CKEDITOR.dtd
- CKEDITOR.env
- CKEDITOR.imageCacher
- CKEDITOR.loader
- CKEDITOR.plugins
- CKEDITOR.resourceManager
- CKEDITOR.scriptLoader
- CKEDITOR.skins
- CKEDITOR.test
- CKEDITOR.themes
- CKEDITOR.tools

## Classes

- CKEDITOR.commandDefinition
- CKEDITOR.dialog
- CKEDITOR.dialog.buttonDefinition
- CKEDITOR.dialog.contentDefinition
- CKEDITOR.dialog.contentDefinitionObject
- CKEDITOR.dialog.dialogDefinition
- CKEDITOR.dialog.dialogDefinitionObject
- CKEDITOR.dialog.uiElementDefinition
- CKEDITOR.dialogCommand
- CKEDITOR.dom.document
- CKEDITOR.dom.domObject
- CKEDITOR.dom.element
- CKEDITOR.dom.event
- CKEDITOR.dom.node
- CKEDITOR.dom.selection
- CKEDITOR.dom.text
- CKEDITOR.dom.window
- CKEDITOR.editor
- CKEDITOR.event
- CKEDITOR.eventInfo
- CKEDITOR.focusManager
- CKEDITOR.htmlParser
- CKEDITOR.htmlParser.cdata
- CKEDITOR.htmlParser.comment
- CKEDITOR.htmlParser.element
- CKEDITOR.htmlParser.fragment
- CKEDITOR.htmlParser.text
- CKEDITOR.htmlWriter
- CKEDITOR.keystrokeHandler
- CKEDITOR.pluginDefinition
- CKEDITOR.ui
- CKEDITOR.ui.button
- CKEDITOR.ui.dialog.button
- CKEDITOR.ui.dialog.checkbox
- CKEDITOR.ui.dialog.file
- CKEDITOR.ui.dialog.fileButton
- CKEDITOR.ui.dialog.hbox
- CKEDITOR.ui.dialog.html
- CKEDITOR.ui.dialog.labeledElement
- CKEDITOR.ui.dialog.radio
- CKEDITOR.ui.dialog.select
- CKEDITOR.ui.dialog.textarea
- CKEDITOR.ui.dialog.textInput
- CKEDITOR.ui.dialog.uiElement
- CKEDITOR.ui.dialog.vbox
- CKEDITOR.ui.handlerDefinition
- CKEDITOR.xml

# Class CKEDITOR.ui.dialog.select

Extends CKEDITOR.ui.dialog.uiElement.
Defined in: plugins/dialogui/plugin.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| CKEDITOR.ui.dialog.select(dialog, elementDefinition, htmlList) A select box.

Fields borrowed from class CKEDITOR.ui.dialog.uiElement:
  eventProcessors

Method Summary
Method Attributes | Method Name and Description
--- | ---
| add(label, value, index) Adds an option to the select box.
| clear() Clears all options out of the selection list.
| getInputElement() Gets the DOM element of the select box.
| remove(index) Removes an option from the selection list.

Methods borrowed from class CKEDITOR.ui.dialog.uiElement:
  accessKeyDown, accessKeyUp, disable, enable, focus, getDialog, getElement, getValue, isChanged, isEnabled, isFocusable, isVisible, registerEvents, selectParentTab, setValue

Class Detail
CKEDITOR.ui.dialog.select(dialog, elementDefinition, htmlList)
Since: 3.0
A select box.

Parameters:
{CKEDITOR.dialog} dialog
  Parent dialog object.
{CKEDITOR.dialog.uiElementDefinition} elementDefinition
  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 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.
  - multiple (Optional) Set this to true if you'd like to have a multiple-choice select box.
  - size (Optional) The number of items to display in the select box.
{Array} htmlList
  List of HTML code to output to.

Method Detail
{CKEDITOR.ui.dialog.select} add(label, value, index)
Since: 3.0
Adds an option to the select box.

Parameters:
{String} label
  Option label.
{String} value
  (Optional) Option value, if not defined it'll be assumed to be the same as the label.
{Number} index
  (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} The current select UI element.

{CKEDITOR.ui.dialog.select} clear()
Since: 3.0
Clears all options out of the selection list.

    NO EXAMPLE AVAILABLE

Returns:
  {CKEDITOR.ui.dialog.select} The current select UI element.

{CKEDITOR.dom.element} getInputElement()
Since: 3.0
Gets the DOM element of the select box.

Returns:
  {CKEDITOR.dom.element} The <select> element of this UI element.

{CKEDITOR.ui.dialog.select} remove(index)
Since: 3.0
Removes an option from the selection list.

Parameters:
{Number} index
  Index of the option to be removed.

Returns:
  {CKEDITOR.ui.dialog.select} The current select UI element.

Copyright © 2003-2009, CKSource - Frederico Knabben. All rights reserved.