wojtekmaj / react-pdf

Display PDFs in your React app as easily as if they were images.
https://projects.wojtekmaj.pl/react-pdf
MIT License
9.11k stars 867 forks source link

Enable to copy selected text and replace the default context menu with custom one #1713

Closed krishnaacharyaa closed 2 months ago

krishnaacharyaa commented 6 months ago

Before you start - checklist

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

  1. copy selected text
  2. customize the context menu with a Add to notes icon

image 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

github-actions[bot] commented 2 months ago

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.

github-actions[bot] commented 2 months ago

This issue was closed because it has been stalled for 14 days with no activity.