-
Notifications
You must be signed in to change notification settings - Fork 2
Is there a way to highlight a text selection? #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for reaching out! Just to clarify your use case a bit further:
|
Hi David.
I was looking into https://react-pdf-viewer.dev/plugins/highlight/ and I think this plugin is what I want. Specifically, my expected UX looks like this:
I think the plugin in react-pdf-viewer is what I need. Since that project is not maintained anymore, I would really like to have this feature in this project. |
@ming535 Thanks for the detailed write-up. At the moment, React PDF don’t yet support selective text highlighting or highlighting of a particular word in an exact location of the PDF. The existing highlight functionality works by programmatically matching all instances of a keyword across the document. That said, what you described is quite close to the annotation feature we’re planning to build. It will support interactive highlights, notes, and saving annotations, both for display and for print. This is already on our roadmap, though it will take some time to ship. I’ll follow up again once the feature is ready. In the meantime, feel free to explore the rest of React PDF and let me know if you have any other questions. |
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:
Gives all the "Roadmap" a highlight.
I want a way to only highlight a specific text selection. Is that possible with this library?
The text was updated successfully, but these errors were encountered: