Objective C - UIWebview - convert javascript text range to object object c and vice versa

I have a UIWebview that displays html content. when the user selects a piece of text, I want to save the range of this text with the lens c, and then recall that the saved range at a later stage for re-selecting text in UIWebview.

Closest I can get the following javascript:

var selection = window.getSelection();
var range = selection.getRangeAt(selection.rangeCount);

But I have no idea how to return a range object back to lens c to save it and reuse later. Can someone point me outright right?

Thanks, EZFrag

+3
source share
1 answer
+2

All Articles