I have a content editable div.
I also have a button outside of this div.
When the user presses the button I wish to store the caret position where the user was in the content editable div.
Pressing the button loses focus on the content editable div, so I think the best method would be to store the caret position on blur?
Would there be a more favourable method?
Also, how would I store the caret position for an editable div?