How to get caret horizontal position in contenteditable element?
I have a contenteditable element (div) which contains some text and html. I need to find horizontal position of the caret on current line. I need number which is relative to each line that is within this contenteditable element. I know how to get absolute position of 开发者_JAVA技巧the caret in whole contenteditable but I am looking for position on current line. Can anybody help ? Preferably using jQuery.
精彩评论