• create a text highlighter

    Parameters

    • container:
          | undefined
          | null
          | HTMLElement
          | (() => undefined | null | HTMLElement)
    • highlightName: string
    • css:
          | undefined
          | null
          | string
          | ((colorScheme: "dark" | "light") => string) = ...

    Returns {
        dispose: (() => void);
        highlight: ((keyword: string | RegExp) => undefined | (() => void));
        remove: (() => void);
    }

    • dispose: (() => void)
        • (): void
        • Returns void

    • highlight: ((keyword: string | RegExp) => undefined | (() => void))
        • (keyword): undefined | (() => void)
        • Parameters

          • keyword: string | RegExp

          Returns undefined | (() => void)

    • remove: (() => void)
        • (): void
        • Returns void