TextEditor
Members
EDITOR_TYPE
TextEditor.EDITOR_TYPE
Returns the unique editor type identifier for the text editor.
Methods
beginEditing
textEditor.beginEditing(newInitialValue, event)
Begins editing on a highlighted cell and hides fillHandle corner if was present.
| Param | Type | Description |
|---|---|---|
| newInitialValue | * | The editor initial value. |
| event | Event | The keyboard event object. |
close
textEditor.close()
Closes the editor.
createElements
textEditor.createElements(type)
Creates an editor’s elements and adds necessary CSS classnames.
| Param | Type | Default | Description |
|---|---|---|---|
| type | string | ”textarea” | The type of the element to create. |
focus
textEditor.focus()
Sets focus state on the select element.
getValue
textEditor.getValue() ⇒ number
Gets current value from editable element.
open
textEditor.open()
Opens the editor and adjust its size.
prepare
textEditor.prepare(row, col, prop, td, value, cellProperties)
Prepares editor’s meta data.
| Param | Type | Description |
|---|---|---|
| row | number | The visual row index. |
| col | number | The visual column index. |
| prop | number string | The column property (passed when datasource is an array of objects). |
| td | HTMLTableCellElement | The rendered cell element. |
| value | * | The rendered value. |
| cellProperties | object | The cell meta object (see Core#getCellMeta). |
setValue
textEditor.setValue(newValue)
Sets new value into editable element.
| Param | Type | Description |
|---|---|---|
| newValue | * | The editor value. |