I am looking for a way to get and set the caret position in an editable DIV.
I have tried using the TextRange option, this is using the
document.selection.createRange() function. The problem is that the
TextRange object is sometimes shared in memory, and consequently one
modification of the TextRange will affect another.
save the TextRange objects to restore any changes made to the DIV content
when the user hits CTRL Z.
one does not work for me because I have more than one editable DIV open at a
time, and hitting CTRL Z on one DIV may undo changes on the other DIV.
Many Thanks to all who answer!!