php syntax coloring with HTML and jQuery
is it possible to have a <textarea> widget to support php syntax coloring with jQuery?
In short, I'd need to colorize code while the user is typing it into the textarea.
It would be great if line numbers were shown too, but it is not strictly necessary.
Any other framework w开发者_开发百科ould eventually be welcome.
Thanks.
There's a neat javascript library called CodeMirror that allows to do that.
There's the option to display line numbers, and works in real time, for a variety of languages, including PHP.
It is not related to and does not depend on jQuery.
You can change the color of the textarea in the onchange with:
onchange="$(this).css('color','#00FF00')"
加载中,请稍侯......
精彩评论