Trilium Frontend API
    Preparing search index...

    Interface EditorStateConfig

    Options passed when creating an editor state.

    interface EditorStateConfig {
        doc?: string | Text;
        extensions?: Extension;
        selection?: EditorSelection | { anchor: number; head?: number };
    }

    Hierarchy (View Summary)

    Index

    Properties

    doc?: string | Text

    The initial document. Defaults to an empty document. Can be provided either as a plain string (which will be split into lines according to the value of the lineSeparator facet), or an instance of the Text class (which is what the state will use to represent the document).

    extensions?: Extension

    Extension(s) to associate with this state.

    selection?: EditorSelection | { anchor: number; head?: number }

    The starting selection. Defaults to a cursor at the very start of the document.