Skip to content

HistoryEntry

type HistoryEntry = {
inverse?: TransactionOp[];
label?: string;
ops?: TransactionOp[];
selectionBefore?: Selection;
stateAfter: EditorState;
stateBefore: EditorState;
timestamp: number;
};

Defined in: history.ts:4

PropertyTypeDescriptionDefined in
inverse?TransactionOp[]The op-based inverse of the transaction, computed at dispatch time. Replayed on undo so undo/redo flow through dispatch as real recorded transactions. undefined when the transaction was not invertible — the controller then falls back to a snapshot restore.history.ts:17
label?string-history.ts:7
ops?TransactionOp[]The forward ops of the transaction, deep-cloned. Replayed on redo.history.ts:10
selectionBefore?SelectionSelection before the transaction; restored as the caret on undo.history.ts:19
stateAfterEditorState-history.ts:6
stateBeforeEditorState-history.ts:5
timestampnumber-history.ts:8