I have a UIWebView with static textual content and need to get the rect of a certain NSRange of text in the web view’s content.
I’m guessing the only way to go about this is through javascript but I’m not sure where to start. How would you go about doing this?
Here’s the solution I’ve come up with, thanks to Anton for how to actually get the
ClientRectfrom the node. What I’ve basically implemented is a way to get from a range in the plain text to get to a start node, start position in the node, end node and end position in the node.