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.
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.