Can I get the offset of a selected html element in the html source code?
for example:
<html>
<body>
<a href="http://google.com">google</a>
</body>
<html>
if the user would select the google text, I would want to get 40 as this is the offset from the start of the source.
I tried with Range object but couldn’t find something helpful with this one.
Thanks!
1 Answer