code hightlighting while submitting article
-
Hi, I have a requirement on code highlighting. Whenever user submits an article from editor if it is related to .net code i want to display like what visual studio does( in the color format eg public key word as blue color,comment like green..etc). It should support both C# and VB.NET. Can anyone tell me how to do this any free tool available. i want to do web application.
Ashok Nalam
modified on Friday, March 5, 2010 3:37 AM
-
Hi, I have a requirement on code highlighting. Whenever user submits an article from editor if it is related to .net code i want to display like what visual studio does( in the color format eg public key word as blue color,comment like green..etc). It should support both C# and VB.NET. Can anyone tell me how to do this any free tool available. i want to do web application.
Ashok Nalam
modified on Friday, March 5, 2010 3:37 AM
when u read line by line from editor, u should compare the words...if it matches any pattern then color them accordingly...if the pattern matches a comment until the end of line u need to mark it as green...