How to see the number of lines in a draft

Is there a way to see the number of lines in a draft? I’m hoping I’ve neglected something obvious within the app, but, for instance, the information at the bottom of the draft window shows a character count and a word count. Very helpful, but not the number of lines, which is what I’m looking for. I tried searching the built in actions, as well as the Drafts Action Directory, but couldn’t seem to find an action that does this. Any ideas? Thanks!

You can turn on paragraph numbers to display line numbers in the editor. I haven’t seen a specific action to display it, but it is simple to calculate. A script like below would show the line count:

let ct = draft.lines.length;
alert(“Lines: “ + ct);

What is a line?

A dumb question - until you start to think about it.


I forgot about enabling paragraph numbers—that’s simple and sufficient for my purposes. Thanks.

1 Like

A line is a string with some newline character at the end that will fit on any screen … watches included


in fact is is like a paragraph but shorter

but wait …

1 Like