@witchcraft/editor
    Preparing search index...
    interface HistoryStorage {
        docId?: string;
        documentApi?: any;
        redirectDispatch?: Dispatch;
        redirectState?: () => EditorState | undefined;
    }
    Index
    docId?: string

    The id of the document this editor is bound to. Used with documentApi to resolve the per-doc state. Set via setCollabContext.

    documentApi?: any

    The document api, so undo/redo can find the per-doc state when a yjs UndoManager exists (collab documents). Set via setCollabContext.

    redirectDispatch?: Dispatch

    Required if redirectState is set. Tells the extension how to forward the transactions.

    redirectState?: () => EditorState | undefined

    If set, undo and redo will be forwarded to the editor this function returns instead of the current one, when a per-doc yjs UndoManager is not available (non-collab documents). This makes handling embedded editors easier.

    This is a function so as to make it easier to always get the latest state.