I want to display the line number in a textarea like this is possible in jQuery:
I looked for answers on SO but I can't find what I want
Display current line and column number for a textarea
Limit number of lines in textarea and Display line count using jQuery
Also, the solution I tried from the JSFiddle provided from the comments show me the textarea like this:
which line 1234 is the first line and the second line is 5678
Download the plugin found here: http://alan.blog-city.com/jquerylinedtextarea.htm
Usage:
$(function() {
// Target all classed with ".lined"
$(".lined").linedtextarea(
{selectedLine: 1}
);
// Target a single one
$("#mytextarea").linedtextarea();
});
Fully functional demo: http://files.aw20.net/jquery-linedtextarea/jquery-linedtextarea.html (web.archive)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With