ComPDFKit Web SDK
    Preparing search index...

    Interface TextSelection

    The current text selection.

    interface TextSelection {
        anchor: TextPosition | null;
        focus: TextPosition | null;
        ranges: ReadonlyMap<number, { end: number; start: number }>;
    }
    Index
    anchor: TextPosition | null

    Where the selection started; null without a selection.

    focus: TextPosition | null

    Where the selection ends (the moving end); null without a selection.

    ranges: ReadonlyMap<number, { end: number; start: number }>

    Character ranges per page (half-open), keyed by page number