Trevixal API
    Preparing search index...

    Interface FindReplace

    interface FindReplace {
        activeIndex: number;
        element: HTMLElement;
        isOpen: boolean;
        matches: readonly SearchMatch[];
        close(): void;
        destroy(): void;
        findNext(): void;
        findPrevious(): void;
        open(): void;
        replaceAllMatches(replacement: string): number;
        replaceCurrent(replacement: string): boolean;
        search(query: FindReplaceQuery): FindReplaceResult;
    }
    Index
    activeIndex: number

    Index of the highlighted match, or -1 when there is none.

    element: HTMLElement
    isOpen: boolean
    matches: readonly SearchMatch[]
    • Hide the bar and clear its highlights.

      Returns void

    • Returns void

    • Returns void

    • Returns void

    • Show the bar and focus the query field.

      Returns void

    • Replace every match. Returns how many were replaced.

      Parameters

      • replacement: string

      Returns number

    • Replace the active match. Returns true when the document changed.

      Parameters

      • replacement: string

      Returns boolean