Namespace

undoRedo

kiss.undoRedo

Undo / Redo operations

This module captures the Ctrl+Z (undo) and Ctrl+Y (redo) keys then execute the corresponding callback actions.

View Source client/core/modules/undoRedo.js, line 10

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)

View Source client/core/modules/undoRedo.js, line 31

Example
kiss.undoRedo.init({
 undo() {
    // Undo code here
 },
 redo() {
  // Redo code here
 }
})