History extension that overrides the undo/redo behavior of the browser.
Without this extension, the browser's native undo/redo is used, which can be sufficient
in some cases.
It should be noted that the history stack is not automatically cleared when the editors
value is changed programmatically using editor.setOptions Instead you can clear the
stack any time using EditHistory.clear.
Once added to an editor, this extension can be accessed from editor.extensions.history.
If you want to create a new editor with different extensions while keeping the undo/redo
history of an old editor, you can! Just add the old editor's history extension instance
to the new editor. Keep in mind that this will fully break the undo/redo behavior of the
old editor.
Parameters
historyLimit: number = 999
The maximum size of the history stack. Defaults to 999.
History extension that overrides the undo/redo behavior of the browser.
Without this extension, the browser's native undo/redo is used, which can be sufficient in some cases.
It should be noted that the history stack is not automatically cleared when the editors value is changed programmatically using
editor.setOptions
Instead you can clear the stack any time using EditHistory.clear.Once added to an editor, this extension can be accessed from
editor.extensions.history
.If you want to create a new editor with different extensions while keeping the undo/redo history of an old editor, you can! Just add the old editor's history extension instance to the new editor. Keep in mind that this will fully break the undo/redo behavior of the old editor.