MergeCells
Members
DEFAULT_SETTINGS
MergeCells.DEFAULT_SETTINGS
Returns the default settings applied when the plugin is enabled without explicit configuration.
PLUGIN_KEY
MergeCells.PLUGIN_KEY
Returns the plugin key used to identify this plugin in Handsontable settings.
PLUGIN_PRIORITY
MergeCells.PLUGIN_PRIORITY
Returns the priority order used to determine the order in which plugins are initialized.
Methods
clearCollections
mergeCells.clearCollections()
Clears the merged cells from the merged cell container.
disablePlugin
mergeCells.disablePlugin()
Disables the plugin functionality for this Handsontable instance.
enablePlugin
mergeCells.enablePlugin()
Enables the plugin functionality for this Handsontable instance.
isEnabled
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
mergeCells.merge(startRow, startColumn, endRow, endColumn)
Merges the specified range.
Emits: Hooks#event:beforeMergeCells, Hooks#event:afterMergeCells
| Param | Type | Description |
|---|---|---|
| startRow | number | Start row of the merged cell. |
| startColumn | number | Start column of the merged cell. |
| endRow | number | End row of the merged cell. |
| endColumn | number | End column of the merged cell. |
mergeSelection
mergeCells.mergeSelection([cellRange])
Merges the selection provided as a cell range.
| Param | Type | Description |
|---|---|---|
| [cellRange] | CellRange | optional Selection cell range. |
unmerge
mergeCells.unmerge(startRow, startColumn, endRow, endColumn)
Unmerges the merged cell in the provided range.
Emits: Hooks#event:beforeUnmergeCells, Hooks#event:afterUnmergeCells
| Param | Type | Description |
|---|---|---|
| startRow | number | Start row of the merged cell. |
| startColumn | number | Start column of the merged cell. |
| endRow | number | End row of the merged cell. |
| endColumn | number | End column of the merged cell. |
unmergeSelection
mergeCells.unmergeSelection([cellRange])
Unmerges the selection provided as a cell range.
| Param | Type | Description |
|---|---|---|
| [cellRange] | CellRange | optional Selection cell range. |
updatePlugin
mergeCells.updatePlugin()
Updates the plugin’s state.
This method is executed when updateSettings() is invoked with any of the
following configuration options: