Skip to content

Is there a way to highlight a text selection? #23

Closed
@ming535

Description

@ming535

Hi, is there a way to highlight a specific text selection?

I am building an app to allow user to highlight a selected text inside the pdf.

I played with the example using useHighlightContext, but it seems that the keyword is matched by reg or text search.

For example:

keyword: "Roadmap",
highlightColor: "rgba(255, 0, 255, 0.5)",
options: { matchCase: true, wholeWords: true },

Gives all the "Roadmap" a highlight.

I want a way to only highlight a specific text selection. Is that possible with this library?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions