UndoRedo
Methods
clear
undoRedo.clear()
Clears undo and redo history.
destroy
undoRedo.destroy()
Destroys the plugin instance.
disablePlugin
undoRedo.disablePlugin()
Disables the plugin functionality for this Handsontable instance.
done
undoRedo.done(wrappedAction, [source])
Stash information about performed actions.
Emits: Hooks#event:beforeUndoStackChange, Hooks#event:afterUndoStackChange, Hooks#event:beforeRedoStackChange, Hooks#event:afterRedoStackChange
| Param | Type | Description |
|---|---|---|
| wrappedAction | function | The action descriptor wrapped in a closure. |
| [source] | string | optional Source of the action. It is defined just for more general actions (not related to plugins). |
enablePlugin
undoRedo.enablePlugin()
Enables the plugin functionality for this Handsontable instance.
isEnabled
undoRedo.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 UndoRedo#enablePlugin method is called.
isRedoAvailable
undoRedo.isRedoAvailable() ⇒ boolean
Checks if redo action is available.
Returns: boolean - Return true if redo can be performed, false otherwise.
isUndoAvailable
undoRedo.isUndoAvailable() ⇒ boolean
Checks if undo action is available.
Returns: boolean - Return true if undo can be performed, false otherwise.
redo
undoRedo.redo()
Redo the previous action performed to the table (used to reverse an undo).
Emits: Hooks#event:beforeUndoStackChange, Hooks#event:afterUndoStackChange, Hooks#event:beforeRedoStackChange, Hooks#event:afterRedoStackChange, Hooks#event:beforeRedo, Hooks#event:afterRedo
undo
undoRedo.undo()
Undo the last action performed to the table.
Emits: Hooks#event:beforeUndoStackChange, Hooks#event:afterUndoStackChange, Hooks#event:beforeRedoStackChange, Hooks#event:afterRedoStackChange, Hooks#event:beforeUndo, Hooks#event:afterUndo