rupertlssmith / rte-toolkit-patch / RichText.Model.History

This module contains the type used to store undo/redo history.


type alias 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:

peek : 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.