Skip to content

Methods

clearCollections

Source code

mergeCells.clearCollections()

Clears the merged cells from the merged cell container.

disablePlugin

Source code

mergeCells.disablePlugin()

Disables the plugin functionality for this Handsontable instance.

enablePlugin

Source code

mergeCells.enablePlugin()

Enables the plugin functionality for this Handsontable instance.

isEnabled

Source code

mergeCells.isEnabled() ⇒ boolean

Checks if the plugin is enabled in the handsontable settings. This method is executed in Hooks#beforeInit hook and if it returns true then the MergeCells#enablePlugin method is called.

merge

Source code

mergeCells.merge(startRow, startColumn, endRow, endColumn)

Merges the specified range.

Emits: Hooks#event:beforeMergeCells, Hooks#event:afterMergeCells

ParamTypeDescription
startRownumberStart row of the merged cell.
startColumnnumberStart column of the merged cell.
endRownumberEnd row of the merged cell.
endColumnnumberEnd column of the merged cell.

mergeSelection

Source code

mergeCells.mergeSelection([cellRange])

Merges the selection provided as a cell range.

ParamTypeDescription
[cellRange]CellRangeoptional Selection cell range.

unmerge

Source code

mergeCells.unmerge(startRow, startColumn, endRow, endColumn)

Unmerges the merged cell in the provided range.

Emits: Hooks#event:beforeUnmergeCells, Hooks#event:afterUnmergeCells

ParamTypeDescription
startRownumberStart row of the merged cell.
startColumnnumberStart column of the merged cell.
endRownumberEnd row of the merged cell.
endColumnnumberEnd column of the merged cell.

unmergeSelection

Source code

mergeCells.unmergeSelection([cellRange])

Unmerges the selection provided as a cell range.

ParamTypeDescription
[cellRange]CellRangeoptional Selection cell range.

updatePlugin

Source code

mergeCells.updatePlugin()

Updates the plugin’s state.

This method is executed when updateSettings() is invoked with any of the following configuration options: