How to get start and end index using javascript?
I wrote the following code:
var selection = document.getSelection(); var start = selection.anchorOffset