Line number problems

we are attempting to make our editor has the feature of line number.

seems that the proper way to achieve that i need split long text into new line’s new paragraph , as
< p > i am loooooooooooooog, one </ p >
< p > p container space not enough < /p >

if so, i can query each p to show line number。 however long text multiple lines wrapped by same one paragraph if keep typing,

is there anything i am missing to make new line text in another paragraph , or any suggestion to line numbers ?

I don’t think line numbers are a good fit for an editor like ProseMirror, since, as you found, its content isn’t really organized by line (and this gets worse when you add nested structure like lists or tables).

wow , thx for replay! what if line numbers ignore all advanced plugins like table, only count text or basic marks lines ?