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: