开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜