Skip to content

HandsontableEditor

Members

EDITOR_TYPE

Source code

HandsontableEditor.EDITOR_TYPE

Returns the unique editor type identifier for the Handsontable editor.

isFlippedHorizontally

Source code

handsontableEditor.isFlippedHorizontally : boolean

The flag determining if the editor is flipped horizontally (rendered on the inline start of the edited cell) or not.

isFlippedVertically

Source code

handsontableEditor.isFlippedVertically : boolean

The flag determining if the editor is flipped vertically (rendered on the top of the edited cell) or not.

Methods

beginEditing

Source code

handsontableEditor.beginEditing(newInitialValue, event)

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

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

close

Source code

handsontableEditor.close()

Closes the editor.

createElements

Source code

handsontableEditor.createElements()

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

finishEditing

Source code

handsontableEditor.finishEditing(restoreOriginalValue, ctrlDown, callback)

Finishes editing and start saving or restoring process for editing cell or last selected range.

ParamTypeDescription
restoreOriginalValuebooleanIf true, then closes editor without saving value from the editor into a cell.
ctrlDownbooleanIf true, then saveValue will save editor’s value to each cell in the last selected range.
callbackfunctionThe callback function, fired after editor closing.

getDropdownHeight

Source code

handsontableEditor.getDropdownHeight() ⇒ number

Return the DOM height of the editor’s container.

getDropdownWidth

Source code

handsontableEditor.getDropdownWidth() ⇒ number

Return the DOM width of the editor’s container.

getTargetDropdownHeight

Source code

handsontableEditor.getTargetDropdownHeight() ⇒ number

Calculates the proposed/target editor height that should be set once the editor is opened. The method may be overwritten in the child class to provide a custom size logic.

getTargetDropdownWidth

Source code

handsontableEditor.getTargetDropdownWidth() ⇒ number

Calculates the proposed/target editor width that should be set once the editor is opened. The method may be overwritten in the child class to provide a custom size logic.

open

Source code

handsontableEditor.open()

Opens the editor and adjust its size.

prepare

Source code

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

Prepares editor’s meta data and configuration of the internal Handsontable’s instance.

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).