Forum Moderators: open

Message Too Old, No Replies

JS to Color Code HTML in a TEXTAEA

         

Krapulator

2:16 am on Sep 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does anyone know of a pre-written JS which will color-code html contained in a textarea in a manner similiar to the code view on a html editor?

Krapulator

2:44 am on Sep 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If indeed this is even possible with Javascript.

Bernard Marx

8:46 am on Sep 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is possible with Javascript (not easy though).

Dean Edwards is the man with the popular .htc that will give JS syntax highlighting to the contents of any assigned container. This could be rearranged to be a function for XB purposes. Try it.

[dean.edwards.name...] ( js-highlight.htc )