Hi,
I'm finding tons of good, crossbrowser anwers on how to SET the cursor or caret position in a contentEditable DIV, but none on how to GET or find its position...
What I want to do is know the position of the caret within this div, on keyup.
So, when the user is typing text, I can at any point know its cursor's position within the div.
EDIT: I'm looking for the INDEX within the div contents (text), not the cursor coordinates.
<div id="contentBox" contentEditable="true"></div>
$('#contentbox').keyup(function() {
// ... ?
});