State

state.undo#

Arguments:

  • html String
    • HTML from the undo state
  • offset Object
    • Cursor position in HTML from the undo state

Occurs whenever user presses ctrl/cmd+z or the undo button or a plugin calls the state.undo command using the API.

Redactor('#entry', {
    subscribe: {
        'state.undo': function(event) {
            ...
        }
    }
});

state.redo#

Arguments:

  • html String
    • HTML from the redo state
  • offset Object
    • Cursor position in HTML from the redo state

Occurs whenever user presses ctrl/cmd+shift+z or the redo button or a plugin calls the state.redo command using the API.

Redactor('#entry', {
    subscribe: {
        'state.redo': function(event) {
            ...
        }
    }
});