Trevixal API
    Preparing search index...

    Interface ParseRule

    A rule for importing HTML: which tag maps to this node/mark, and how its attributes translate. getAttrs returning false rejects the match (the element is then treated as unknown: kept content, dropped formatting).

    interface ParseRule {
        attribute?: string;
        getAttrs?: (
            element: HTMLElement,
        ) => false | Readonly<Record<string, unknown>> | null;
        tag: string;
    }
    Index
    attribute?: string

    Attribute that must additionally be present on the element.

    getAttrs?: (
        element: HTMLElement,
    ) => false | Readonly<Record<string, unknown>> | null
    tag: string

    Lowercase tag name to match (e.g. "h2", "strong").