This is a lower-level API. Lower-level APIs are not recommended for most projects, and may not be available on all plans. See our page on recommended deployment patterns for more information.
Public Method Question Editor API


Revert Question Editor state to a newer captured state.

Conditions that may prevent operation to be performed:

  • A previous Undo/Redo operation is still running.
  • There are no previous snapshots to revert to.
  • A snapshot is currently being saved.
  • The page has not yet completely loaded.

To know when the undo operation has completed, listen to the revisionHistoryState:change (refer to event types) and watch for when either canUndo or canRedo is true.

Note User must have called undo method before being able to call redo method.

Note If undo method is called and then a change is made to the question, then the redo operation can not be called, as the newer states will have been removed to capture the latest change.


// event to listen - after undo
questionEditorApp.on("revisionHistoryState:change", function (data) {
    console.log(data); //{canUndo: false, canRedo: true}

questionEditorApp.redo(); //{canUndo: true, canRedo: false}



Return value

  • boolean
    If the operation can not be performed, then false is returned
  • null
    If the operation can be performed, then null is returned
Was this article helpful?