How do i highlight text after overriding longmenupress copy clicked and getting content and coordinates of the copy on react native?


Product Version:9.408051

Please give a brief summary of your issue:
(Think of this as an email subject)
I want to add highlight on text after I copy the text from longpressmenu

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

Please provide a link to a minimal sample where the issue is reproducible:

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Hi there,
In the long-press text selection menu, you should see a “Highlight” menu option that does what you want (you might have to press the right-arrow (>) to see the “Highlight” menu option).

after I press copy menu from on longPressMenu ;
I should be able to highlight the text that I have copied

for example here i am using annotation menu override

onAnnotationMenuPress={({annotationMenu, annotations}) => {
‘Annotation menu item’,
‘has been pressed’,
annotations.forEach(annotation => {
.then(range => {
console.log(‘range’, range);
const pages = this.getPages(range.begin, range.end);
return Promise.all( => this._viewer.current.getSelection(page)),
.then(texts => {
this.setState({selectedtext: texts[0].unicode});
console.log(JSON.stringify(texts[0].quads, null, 4));
// write function to create a text highlight
this.highlighttext(example args)
“pageNumber”: 1,
“screenRect”: {
“x2”: 337.1136139667183,
“y1”: 276.8439820093754,
“x1”: 63.00110864745012,
“height”: 36.677682756873196,
“y2”: 240.1662992525022,
“width”: 274.11250531926817
“pageRect”: {
“x2”: 515.2664978540773,
“y1”: 417.623,
“x1”: 95.04849785407724,
“height”: 56.21300000000002,
“y2”: 473.836,
“width”: 420.2180000000001
“type”: “AnnotationCreateFreeHighlighter”,
“id”: “41ee44cf-1c06-d239-d786-7e80bfadf9f1”

if it makes any sense

To help ensure that we are on the same page, could you please provide a minimal working sample project that demonstrates your setup? If you can also include a screen-recording video showing the steps to reproduce the issue that would be appreciated.

You can open a Technical Support ticket for this, here: