Thank you. This is working as I expected.
But I have one more doubt, from the list of quads we got from "textSelected" method, how we can know if the selected text is divided in two different lines?
I want to create texthighlight annotation on this selected text area. So when I select text in just single line it works properly using following code:
var firstQuads = window.currentQuads[0].getPoints();
var lastQuads = window.currentQuads[window.currentQuads.length-1].getPoints();
annot.setRect(new Annotations.Rect(firstQuads.x4, firstQuads.y4, lastQuads.x2,lastQuads.y2));
But when I select text in multiple lines like this,
it does not work. It leaves out some text like this:
Could you please help me resolve this issue?