This module contains the type used to store undo/redo history.
RichText.Internal.History.History
History
contains the undo deque and redo stack related to undo history.
empty : { groupDelayMilliseconds : Basics.Int, size : Basics.Int } -> History
Provides an empty History
with the given config. The config values are as follows:
groupDelayMilliseconds
is the interval which the editor will ignore adding multiple text changes onto the undo stack. This is
so the history doesn't get overwhelmed by single character changes.size
is the number of states stored in the historypeek : History -> Maybe ( String, RichText.Model.State.State )
Returns the last executed action and previous state on the undo stack.
undoList : History -> List ( String, RichText.Model.State.State )
Returns the entire undo stack.
redoList : History -> List RichText.Model.State.State
Returns the entire redo stack.