Get current line number in contenteditable
I have a contenteditable element w开发者_StackOverflowhich is being used for simple text editing. I need to get the current line number that the caret is on.
Is this possible? Here is my code for the contenteditable element.
<section contenteditable="true" id="writer">
<p>write something</p>
</section>
精彩评论