Lined textarea extension
Posted 2010-11-23 14:33:16 by .

I my last article I found a way getting the errors from Cheetah template rendering. I now needed a way to highlight problems in a HTML textarea. I came across Alan's great plugin just as I was about to give up.

I needed to make one additional change to it. I've modified the jquery-linedtexarea plugin to pass in "selectedLines". This allows a list of lines to be given, which will then be highlighted. See my live demo. The modified javascript code is available here: jquery-linedtextarea.js

The textarea is set up and the selectedLines array is passed in as follows:

$(document).ready(function () {
$(".lined").linedtextarea({
selectedLines: [3,6,13]
});
});

Now I'm just need to see if the author will accept my change.

Reference:

 

Comments

No Comments. Be the first to add one.

New Comment

Your email is never published nor shared.
Required fields are marked *
*
*