TextEditor

Parameters:
Name Type Description
instance Core

The Handsontable instance.

Methods

beginEditing(newInitialValue, event)

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

Parameters:
Name Type Description
newInitialValue *

The editor initial value.

event Event

The keyboard event object.

close()

Closes the editor.

createElements()

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

focus()

Sets focus state on the select element.

getValue(){number}

Gets current value from editable element.

Returns: {number}

onBeforeKeyDown(event)

OnBeforeKeyDown callback.

Parameters:
Name Type Description
event Event

The keyboard event object.

open()

Opens the editor and adjust its size.

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

Prepares editor's meta data.

Parameters:
Name 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(newValue)

Sets new value into editable element.

Parameters:
Name Type Description
newValue *

The editor value.

Class: TextEditor