wojtekmaj / react-pdf

Display PDFs in your React app as easily as if they were images.

Home Page:https://projects.wojtekmaj.pl/react-pdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

krishnaacharyaa opened this issue · comments

Before you start - checklist

  • I followed instructions in documentation written for my React-PDF version
  • I have checked if this bug is not already reported
  • I have checked if an issue is not listed in Known issues
  • 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

  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

  • **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.