I’m finding tons of good, cross-browser answers on how to set the caret position in a contentEditable element, but none on how to get the caret position in the first place. What I want to do is know the caret position within a div on keyup. So, when the user is typing text, I can, at any point, know the
Tag: contenteditable
Limiting the number of characters in a ContentEditable div
I am using contenteditable div elements in my web application and I am trying to come up with a solution to limit the amount of characters allowed in the area, and once the limit is hit, attempting to enter characters simply does nothing. This is what I have so far: This does limit the number of characters to the number