Trevixal API
    Preparing search index...

    Interface NodeSpec

    interface NodeSpec {
        atom?: boolean;
        attrs?: Readonly<Record<string, { default?: unknown }>>;
        content?: string;
        exportText?: (node: EditorNode) => string;
        group?: string;
        inline?: boolean;
        marks?: string;
        parseHTML?: readonly ParseRule[];
        plainText?: (node: EditorNode) => string;
        preserveWhitespace?: boolean;
        toHTML?: (node: EditorNode) => HTMLSpec;
    }
    Index
    atom?: boolean
    attrs?: Readonly<Record<string, { default?: unknown }>>
    content?: string

    Content expression, e.g. "block+" or "inline*". Omit for leaf nodes.

    exportText?: (node: EditorNode) => string

    For an atom a format cannot draw, an equation or a video: the words it is written as there instead. Plain text, Markdown, Word and the other writers read it through exportTextOf, which otherwise drop an atom that has no text of its own.

    group?: string

    Space-separated group names this node belongs to (e.g. "block").

    inline?: boolean
    marks?: string

    Marks allowed on inline content: "_" for all (default for textblocks), "" for none, or space-separated mark names.

    parseHTML?: readonly ParseRule[]
    plainText?: (node: EditorNode) => string

    For an inline atom that is styled words rather than content, a button or a badge: the text it turns into when Clear all formatting makes the selection plain. An atom without one (a mention, a footnote marker, an equation) is content, and stays.

    preserveWhitespace?: boolean

    Preserve whitespace verbatim when parsing into this node (code blocks).

    toHTML?: (node: EditorNode) => HTMLSpec