S
sasperilla
Hi,
I would like to find the coordinates of a word inside a div or span
tag. I know you can find the coordinates of a tag inside the DOM, but
can you get the coordinates of a portion of the text inside that
element in javascript?
If the user highlights or selects text in a div or span can I get the
indicies that make up that selected piece of text? What API of
javascript do I use to find that out? Or really is there a way in
javascript to interact with the browsers text selection?
Thanks
Charlie
I would like to find the coordinates of a word inside a div or span
tag. I know you can find the coordinates of a tag inside the DOM, but
can you get the coordinates of a portion of the text inside that
element in javascript?
If the user highlights or selects text in a div or span can I get the
indicies that make up that selected piece of text? What API of
javascript do I use to find that out? Or really is there a way in
javascript to interact with the browsers text selection?
Thanks
Charlie