Get position of word from html code given its start and end index calculated from
I have
Code:
contenteditable
div and would like to know the index of character typed in it with respect to html code.
For example:
Code:
<div id="editableDiv" contenteditable="true">
the @twitter
</div>
The sentence is formatted like this: the @twitter
I can calculate the string position in sentence using below sentence. This is called once @ keyed down (start index)...