Class CKEDITOR.dialog.definition.textInput
Extends
CKEDITOR.dialog.definition.labeledElement.
Defined in: plugins/dialog/dialogDefinition.js.
Constructor Attributes | Constructor Name and Description |
---|---|
The definition of a text field (single line).
|
Field Attributes | Field Name and Description |
---|---|
The default value.
|
|
(Optional) The maximum length.
|
|
(Optional) The size of the input field.
|
|
(Optional) The validation function.
|
- Fields borrowed from class CKEDITOR.dialog.definition.labeledElement:
- controlStyle, inputStyle, label, labelLayout, labelStyle, widths
- Fields borrowed from class CKEDITOR.dialog.definition.uiElement:
- align, className, commit, id, onHide, onLoad, onShow, setup, style, title, type
Class Detail
CKEDITOR.dialog.definition.textInput()
Since:
3.0
The definition of a text field (single line).
This class is not really part of the API. It just illustrates the properties
that developers can use to define and create text fields.
Once the dialog is opened, the created element becomes a CKEDITOR.ui.dialog.textInput object and can be accessed with CKEDITOR.dialog#getContentElement.
For a complete example of dialog definition, please check CKEDITOR.dialog.add.
Once the dialog is opened, the created element becomes a CKEDITOR.ui.dialog.textInput object and can be accessed with CKEDITOR.dialog#getContentElement.
// There is no constructor for this class, the user just has to define an // object with the appropriate properties. { type : 'text', id : 'name', label : 'Your name', 'default' : '', validate : function() { if ( !this.getValue() ) { api.openMsgDialog( '', 'Name cannot be empty.' ); return false; } } }
Field Detail
{String}
default
Since:
3.0
The default value.
{Number}
maxLength
Since:
3.0
(Optional) The maximum length.
{Number}
size
Since:
3.0
(Optional) The size of the input field.
{Function}
validate
Since:
3.0
(Optional) The validation function.