Skip to content

TextEditor

Members

EDITOR_TYPE

Source code

TextEditor.EDITOR_TYPE

Returns the unique editor type identifier for the text editor.

Methods

beginEditing

Source code

textEditor.beginEditing(newInitialValue, event)

Begins editing on a highlighted cell and hides fillHandle corner if was present.

ParamTypeDescription
newInitialValue*The editor initial value.
eventEventThe keyboard event object.

close

Source code

textEditor.close()

Closes the editor.

createElements

Source code

textEditor.createElements(type)

Creates an editor’s elements and adds necessary CSS classnames.

ParamTypeDefaultDescription
typestring”textarea”The type of the element to create.

focus

Source code

textEditor.focus()

Sets focus state on the select element.

getValue

Source code

textEditor.getValue() ⇒ number

Gets current value from editable element.

open

Source code

textEditor.open()

Opens the editor and adjust its size.

prepare

Source code

textEditor.prepare(row, col, prop, td, value, cellProperties)

Prepares editor’s meta data.

ParamTypeDescription
rownumberThe visual row index.
colnumberThe visual column index.
propnumber
string
The column property (passed when datasource is an array of objects).
tdHTMLTableCellElementThe rendered cell element.
value*The rendered value.
cellPropertiesobjectThe cell meta object (see Core#getCellMeta).

setValue

Source code

textEditor.setValue(newValue)

Sets new value into editable element.

ParamTypeDescription
newValue*The editor value.