CommandExecutor
Description
Initializes the command executor with a reference to the Handsontable instance.
Members
commands
commandExecutor.commands : object
commonCallback
commandExecutor.commonCallback : function
Methods
execute
commandExecutor.execute(commandName, …params)
Execute command by its name.
| Param | Type | Description |
|---|---|---|
| commandName | string | Command id. |
| …params | * | Arguments passed to command task. |
registerCommand
commandExecutor.registerCommand(name, commandDescriptor)
Register command.
| Param | Type | Description |
|---|---|---|
| name | string | Command name. |
| commandDescriptor | object | Command descriptor object with properties like key (command id), callback (task to execute), name (command name), disabled (command availability). |
setCommonCallback
commandExecutor.setCommonCallback(callback)
Set common callback which will be trigger on every executed command.
| Param | Type | Description |
|---|---|---|
| callback | function | Function which will be fired on every command execute. |