Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
I'm looking to implement code syntax highlighting like is on Code Project. Is the CSS/JavaScript that does the highlighting inside the PRE tags on Code Project open source? If so, is there a place that I can download it? I want to implement a similar feature for our internal documentation site here at work. I've seen the options that are available via Google searches for syntax highlighting, code highlighting, etc. so please don't just give me those same links. I'm looking for something better than what I've found so far. They don't seem that simple to use. I want something that my co-workers can use without thinking too much about it. The way Code Project works is great - just wrap PRE tags around your code and tell it the language. I want something very similar (or the same, if possible).
Posted
Comments
[no name] 3-Apr-13 11:38am    
Just to state the obvious but, have you tried just asking Chris how they do it?
Tim Corey 3-Apr-13 12:00pm    
No, but I was trying to go through proper channels to do so. I figured if I asked the question here, I could get the answer I needed and it would be here for others in the future. If I just ask Chris, it is a one-off answer that doesn't help anyone else but me. If I can't get a good answer, though, I'll just send a message to Chris.
[no name] 3-Apr-13 12:36pm    
Just a thought. Good luck Tim. I think you will probably end up just asking Chris. If you get an answer from him and of course permission, you could always post his answer as a tip/trick or as your own answer to this question for others.

Google is your friend here, or failing that a simple Article search should do the trick: http://www.codeproject.com/search.aspx?doctypeid=1&q=syntax+highlight[^] will give you quite a few solutions to look at!
 
Share this answer
 
Comments
Tim Corey 3-Apr-13 11:13am    
Yeah, I did do a Google search and an article search before posting here. I've reviewed the top 10-20 that seemed relevant, but nothing seemed to work like what we have here on Code Project. A lot deal with desktop apps (rich text boxes, etc.) and those that do deal with web pages seem to be overly complicated and difficult to use.
Well ..The requirement is pretty clear ; nicely written with all the necessary details of what you want and what you don't...

My sincerely apologies if my words sound rude, but the only problem is that you posted it to wrong place...Since you do not want any solutions available via Google and I don't think somebody here is going to write the code for you as per your specific requirements.

If you still want to get a solution you can post it here[^] Since codeproject is not the site where people distribute code OR post your requirement and get the code OR work for free..

Do read the code project logo - "CODE PROJECT - For those who code"... Do you wish they should change it to -"CODE PROJECT - For those who DON'T code"
 
Share this answer
 
Comments
Tim Corey 3-Apr-13 11:58am    
Well, I think you have misunderstood what I am asking. First, I'm asking if the system Code Project uses is available for use (open source). If not, I'm asking if anyone knows of a similar system. My reference to Google is that I don't want someone to just spew back a basic Google search and say "try these". I've done that. I was trying to communicate that I've done research before coming here. What I'm looking for is information from people who have a working solution or know of one. I'm not looking for people with no idea to just paste the Google results I've already looked through. There are probably libraries out there in even my Google searches that I've missed but just posting the links doesn't really help me.

I'm not trying to not do work here. I'm just trying not to reinvent the wheel. That is the point of Code Project. We help each other learn what we already know. That is why I asked the question here. If you check my history, you will see I've spent a lot of time helping others here on Code Project. I'm not trying to get something for no effort. I'm just asking others who know more than me in this area to help point me in the right direction.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900