【发布时间】:2013-12-17 11:27:12
【问题描述】:
我有一个 "contenteditable = true" 的 div。
例如:<div id="editableDiv" contenteditable="true">
<br/>fggggdf
</div>
如何获取相对于 div "editableDiv" 的字符偏移量(例如字符'd' 偏移量)。
提前致谢
【问题讨论】:
-
您想要一个字符的实际偏移量(以像素为单位)...?
-
@gncl
-
你想要一些固定字符的偏移量?
-
@anup '#' 和
'@'看看这个screenshot。谢谢
标签: javascript jquery html contenteditable contentoffset