@twip/web
    Preparing search index...

    Interface Elements

    The merge designer's elements: fields and content controls. Changing them is done with the commands.

    interface Elements {
        boxes(id: ElementId): Promise<ClientRect[]>;
        get(id: ElementId): Promise<ElementDetail>;
        list(
            filter?: {
                kind?: ControlKind | "field";
                match?: { in: "title" | "code" | "tag"; text: string };
                story?:
                    | "textBox"
                    | "header"
                    | "footer"
                    | "body"
                    | "footnote"
                    | "endnote"
                    | "subTemplate";
                subTemplate?: string;
            },
        ): Promise<ElementInfo[]>;
        select(id: ElementId, options?: { reveal?: boolean }): Promise<void>;
        structure(options?: { depth?: number; root?: ElementId }): Promise<Block[]>;
    }

    Hierarchy (View Summary)

    Index
    • The elements, in document order.

      Parameters

      • Optionalfilter: {
            kind?: ControlKind | "field";
            match?: { in: "title" | "code" | "tag"; text: string };
            story?:
                | "textBox"
                | "header"
                | "footer"
                | "body"
                | "footnote"
                | "endnote"
                | "subTemplate";
            subTemplate?: string;
        }
        • Optionalkind?: ControlKind | "field"
        • Optionalmatch?: { in: "title" | "code" | "tag"; text: string }
        • Optionalstory?:
              | "textBox"
              | "header"
              | "footer"
              | "body"
              | "footnote"
              | "endnote"
              | "subTemplate"
        • OptionalsubTemplate?: string

          Only the elements in this sub-template's body.

      Returns Promise<ElementInfo[]>

    • The body (or an element) as blocks. Rejects with invalid-argument for a root that is not an element id and unavailable for one the document doesn't have.

      Parameters

      • Optionaloptions: { depth?: number; root?: ElementId }

      Returns Promise<Block[]>