This is a migrated thread and some comments may be shown as answers.

Line numbers

0 Answers 56 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jesse
Top achievements
Rank 2
Jesse asked on 02 Jul 2012, 09:06 PM
I'm trying to implement a way to keep track of line numbers in the editor. So far I have gotten 

First line here.<br data-line="" />
Additionally for the paragraph tags I have 
<p data-line="">Second line here</p>

I've been looking for a consistent way to get either a count of all lines in the document through the Range Object or some other way to get a line number count. Simply counting the <br/> or <p> elements might work but I haven't been able to get this either.
Thanks for any ideas.

No answers yet. Maybe you can help?

Tags
Editor
Asked by
Jesse
Top achievements
Rank 2
Share this question
or