Yes, there is some of the information you can get to programmatically (and even triggered using Dynamic
). But it's undocumented and should not be considered an interface that will be stable through future versions.
CurrentValue[FEPrivate`UndoInformation[_NotebookObject, _Integer:1]]
Every notebook has its own undo manager, so the NotebookObject
reports undo information for that notebook only. Input fields also have their own undo manager, if you wanted to see the undo information for an InputFieldBox
, you could pass in a BoxObject
instead.
The integer is just an indication of how many levels of the stack you want returned. The default is 1 (just the most recent thing). If you want everything, just pass a big machine integer, like 999999.
Also, you can use RedoInformation
to get information about the redo stack instead.
Example:
CurrentValue[FEPrivate`UndoInformation[EvaluationNotebook[], 999999]]