0

I'm building an epub reader (using this package: https://github.com/victorsoares96/epubjs-react-native), and I want to create a custom text selector with context menu in my application.

The text selector context menu should have a copy option and add an option that calls a javascript function(like a highlight function, for example). I'm building an react-native app.

I don't find the answer anywhere.

Can someone help me?

I want to creat something like this:

enter image description here

I don't know java, just javascript, react, react-native and redux...

1 Answers1

0

Looks like possibly this is a page that demos a solution, and leads to this repo, which is archived, but may help

also mentioned here in this stack overflow question

Brad Parks
  • 66,836
  • 64
  • 257
  • 336
  • Thank you, but I need it for react-native, not react. Thanks! – rauleffting Mar 11 '22 at 21:30
  • did a bit more searching, and edited my answer above – Brad Parks Mar 11 '22 at 23:47
  • Thank you very much, but this only works with texts. I need it to work with an epub reader component. Maybe, the solution would have to be something native. However, I don't know how to program java for android, nor swift for ios. I'm really in need of help creating this custom text context menu. :/ – rauleffting Mar 12 '22 at 00:11
  • So which epub reader component are you using? I'd say put the question to them, in their repo? or mention it here so people know which one it is – Brad Parks Mar 12 '22 at 00:17
  • this one: https://github.com/victorsoares96/epubjs-react-native – rauleffting Mar 12 '22 at 00:24