react-pdf
react-pdf copied to clipboard
Enable to copy selected text and replace the default context menu with custom one
Before you start - checklist
- [X] I followed instructions in documentation written for my React-PDF version
- [X] I have checked if this bug is not already reported
- [X] I have checked if an issue is not listed in Known issues
- [X] If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo
Description
Hi @wojtekmaj Is there any way that i can set the selected data from the pdf in a state variable and give a context menu to "Add to Notes",
Basically clicking on the "Add to notes" in the custom context menu should give me the selected text in a state variable.
Basically 2 parts
- copy selected text
- customize the context menu with a Add to notes icon
The above is the present context menu i.e default context menu...
Can you kindly let me know if it is possible, or ways to make it possible
Steps to reproduce
After the pdf is render Select the text context menu will open
Expected behavior
I expect custom context menu
Actual behavior
Presently it has Default context menu
Additional information
No response
Environment
- **Browser **: edge
- React-PDF version: 7.7.0
- Nextjs version: 14.1.0
- Webpack version (if applicable):
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.
This issue was closed because it has been stalled for 14 days with no activity.