Skip to content
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

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

Open
4 tasks done
krishnaacharyaa opened this issue Feb 6, 2024 · 0 comments
Open
4 tasks done
Labels
bug Something isn't working

Comments

@krishnaacharyaa
Copy link

krishnaacharyaa commented Feb 6, 2024

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):
@krishnaacharyaa krishnaacharyaa added the bug Something isn't working label Feb 6, 2024
@krishnaacharyaa krishnaacharyaa changed the title How can i copy selected data and replace the default context menu with custom one Enable to copy selected text and replace the default context menu with custom one Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant