CKEditor 4 Documentation

CKEDITOR.ui.dialog.textInput

Hierarchy

Files

A text input with a label. This UI element class represents both the single-line text inputs and password inputs in dialog boxes.

Defined By

Properties

Defines the onChange event for UI element definitions.

Defines the onChange event for UI element definitions.

Overrides: CKEDITOR.ui.dialog.uiElement.eventProcessors

Defined By

Methods

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

Creates a textInput class instance.

Parameters

  • dialog : CKEDITOR.dialog

    Parent dialog window object.

  • elementDefinition : CKEDITOR.dialog.definition.uiElement

    The element definition. Accepted fields:

    • default (Optional) The default value.
    • validate (Optional) The validation function.
    • maxLength (Optional) The maximum length of text box contents.
    • size (Optional) The size of the text box. This is usually overridden by the size defined by the skin, though.
  • htmlList : Array

    List of HTML code to output to.

Returns

Overrides: CKEDITOR.ui.dialog.labeledElement.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.

CKEDITOR.ui.dialog.textInput
view source
( )
Handler for the text input's access key up event. ...

Handler for the text input's access key up event. Makes a select() call to the text input.

Overrides: CKEDITOR.ui.dialog.uiElement.accessKeyUp

Disables a UI element. ...

Disables a UI element.

Enables a UI element. ...

Enables a UI element.

CKEDITOR.ui.dialog.textInput
view source
( )
Puts focus into the text input. ...

Puts focus into the text input.

Overrides: CKEDITOR.ui.dialog.uiElement.focus

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

Gets the parent dialog object containing this UI element.

var dialog = uiElement.getDialog();

Returns

CKEDITOR.ui.dialog.textInput
view source
( ) : String
Gets the value of the text direction marker. ...

Gets the value of the text direction marker.

Available since: 4.5

Returns

  • String

    'ltr', 'rtl' or null if the marker is not set.

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.textInput
view source
( ) : CKEDITOR.dom.element
Gets the text input DOM element under this UI object. ...

Gets the text input DOM element under this UI object.

Returns

Overrides: CKEDITOR.ui.dialog.uiElement.getInputElement

Retrieves the current label text of the elment. ...

Retrieves the current label text of the elment.

Returns

  • String

    The current label text.

CKEDITOR.ui.dialog.textInput
view source
( ) : String
Gets the value of this text input object. ...

Gets the value of this text input object.

Returns

  • String

    The value.

Overrides: CKEDITOR.ui.dialog.uiElement.getValue

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.textInput
view source
( )
Selects all the text in the text input. ...

Selects all the text in the text input.

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

CKEDITOR.ui.dialog.textInput
view source
( dir )
Sets the text direction marker and the dir attribute of the input element. ...

Sets the text direction marker and the dir attribute of the input element.

Available since: 4.5

Parameters

  • dir : String

    The text direction. Pass null to reset.

Sets the label text of the element. ...

Sets the label text of the element.

Parameters

  • label : String

    The new label text.

Returns

CKEDITOR.ui.dialog.textInput
view source
( value ) : CKEDITOR.ui.dialog.textInput
Sets the value of this text input object. ...

Sets the value of this text input object.

uiElement.setValue( 'Blamo' );

Parameters

  • value : Object

    The new value.

Returns

Overrides: CKEDITOR.ui.dialog.uiElement.setValue

Defined By

Events

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

Fired when the value of the uiElement is changed.

Parameters