EditorManager

Parameters:
Name Type Description
instance Core

The Handsontable instance.

tableMeta TableMeta

The table meta instance.

selection Selection

The selection instance.

Members

cellPropertiesobject

Keeps a reference to the cell's properties object.

lastKeyCodenumber

Keeps last keyCode pressed from the keydown event.

Methods

staticEditorManager.getInstance(hotInstance, tableMeta, selection){EditorManager}

Parameters:
Name Type Description
hotInstance Core

The Handsontable instance.

tableMeta TableMeta

The table meta class instance.

selection Selection

The selection instance.

Returns: {EditorManager}

closeEditor(restoreOriginalValue, isCtrlPressed, callback)

Close editor, finish editing cell.

Parameters:
Name Type Description
restoreOriginalValue boolean

If true, then closes editor without saving value from the editor into a cell.

isCtrlPressed boolean

If true, then editor will save value to each cell in the last selected range.

callback function

The callback function, fired after editor closing.

closeEditorAndRestoreOriginalValue(isCtrlPressed)

Close editor and restore original value.

Parameters:
Name Type Description
isCtrlPressed boolean

Indication of whether the CTRL button is pressed.

closeEditorAndSaveChanges(isCtrlPressed)

Close editor and save changes.

Parameters:
Name Type Description
isCtrlPressed boolean

If true, then editor will save value to each cell in the last selected range.

destroy()

Destroy the instance.

destroyEditor(revertOriginal)

Destroy current editor, if exists.

Parameters:
Name Type Description
revertOriginal boolean

If false and the cell using allowInvalid option,
then an editor won't be closed until validation is passed.

getActiveEditor(){*}

Get active editor.

Returns: {*}

isEditorOpened(){boolean}

Check is editor is opened/showed.

Returns: {boolean}

lockEditor()

Lock the editor from being prepared and closed. Locking the editor prevents its closing and
reinitialized after selecting the new cell. This feature is necessary for a mobile editor.

openEditor(newInitialValue, event)

Open editor with initial value.

Parameters:
Name Type Description
newInitialValue null | string

New value from which editor will start if handled property it's not the null.

event Event

The event object.

prepareEditor()

Prepare text input to be displayed at given grid cell.

unlockEditor()

Unlock the editor from being prepared and closed. This method restores the original behavior of
the editors where for every new selection its instances are closed.

Class: EditorManager