@twip/web
    Preparing search index...

    Interface SelectionSummary

    What is selected. No document position is public.

    interface SelectionSummary {
        comment: CommentId | null;
        context: ElementContext[];
        empty: boolean;
        headerFooter:
            | {
                kind: "header"
                | "footer";
                label: string;
                page: number;
                section: number;
                type: "default" | "first" | "even";
            }
            | null;
        kind: "object"
        | "element"
        | "text"
        | "caret"
        | "cells";
        link: { address: string; text: string } | null;
        mode: "normal" | "extend" | "block";
        object: ObjectSelection | null;
        page: number;
        revision: RevisionId | null;
        story:
            | "textBox"
            | "header"
            | "footer"
            | "body"
            | "footnote"
            | "endnote"
            | "subTemplate";
        table: TableSelection
        | null;
        text: string | null;
    }
    Index
    comment: CommentId | null

    The comment thread at the caret.

    context: ElementContext[]

    Innermost first: the element the selection is in or covers, then its parents.

    empty: boolean

    Nothing is selected (a caret).

    headerFooter:
        | {
            kind: "header"
            | "footer";
            label: string;
            page: number;
            section: number;
            type: "default" | "first" | "even";
        }
        | null

    Set while a header or footer is being edited.

    Type Declaration

    • {
          kind: "header" | "footer";
          label: string;
          page: number;
          section: number;
          type: "default" | "first" | "even";
      }
      • kind: "header" | "footer"
      • label: string

        For example 'First Page Header -Section 2-'.

      • page: number
      • section: number
      • type: "default" | "first" | "even"
    • null
    kind: "object" | "element" | "text" | "caret" | "cells"

    A caret, text, table cells, an object, or an element.

    link: { address: string; text: string } | null

    The link at the selection, if any.

    mode: "normal" | "extend" | "block"

    The selection mode.

    object: ObjectSelection | null

    The selected object, if any.

    page: number

    The page of the caret.

    revision: RevisionId | null

    The revision at the caret.

    story

    story:
        | "textBox"
        | "header"
        | "footer"
        | "body"
        | "footnote"
        | "endnote"
        | "subTemplate"

    The story the selection is in.

    table: TableSelection | null

    The table around the selection, if any.

    text: string | null

    The selection as plain text, paragraphs separated by \n ('' for a caret), or null when it is longer than 10,000 characters.