Undo / Redo operations
This module captures the Ctrl+Z (undo) and Ctrl+Y (redo) keys then execute the corresponding callback actions.
Methods
# static init(config)
Init the undo/redo module and specify the callbacks to execute when pressing Ctrl+Z or Ctrl+Y
Parameters:
Name | Type | Description |
---|---|---|
config |
object
|
|
undo |
function
|
Callback function to call to undo (Ctrl+Z) |
redo |
function
|
Callback function to call to redo (Ctrl+Y) |
Example
kiss.undoRedo.init({
undo() {
// Undo code here
},
redo() {
// Redo code here
}
})