I would like to know if anyone knows of an online service where we paste the code and it generates back the colored html source code for that code. It could be PHP, HTML, CSS, Javascript, C, Java.
Idea is that once i have the colored html code, i could easily put that in my wordpress.com blog. I know about but just wanted to know an online service that supports multiple languages. The benefit is that, i can choose any color style/theme from that online service for my code.
Thanks
NOTE: This question was originally posted at StackOverflow.com by Sarfraz
- Betty asked 15 years ago
- last edited 15 years ago
- You must login to post comments
Also you can use http://tohtml.com/html/ or GeSHi
NOTE: This answer was originally posted at StackOverflow.com by voodoo555
- Jay answered 15 years ago
-
good answer
- You must login to post comments
Prettify is the code colorizer that StackOverflow uses.
NOTE: This answer was originally posted at StackOverflow.com by Zach Johnson
- Dawn answered 15 years ago
- You must login to post comments
You may want to look at SyntaxHighligher. It uses JavaScript so it’s not using your own server’s resources and supports a bunch of color schemes. http://alexgorbatchev.com/wiki/SyntaxHighlighter
The problem with putting your code in a generator on another website is that if you change it somewhere you have to put it back in, which can become tedious.
NOTE: This answer was originally posted at StackOverflow.com by aelx
- Curtis answered 15 years ago
- You must login to post comments
CodeColorizer is one.
NOTE: This answer was originally posted at StackOverflow.com by SLaks
- Chris answered 15 years ago
- last edited 15 years ago
- You must login to post comments
Do you mean code pasting services such as Pastie?
NOTE: This answer was originally posted at StackOverflow.com by Esko
- Jack answered 15 years ago
- You must login to post comments
I recently found http://hilite.me. I like it because there is an option for formatting text–useful when you are posting a config file or a series of commands.
From a WordPress standpoint I’ve been trying to trim back the number of plugins I’m running after a scan on pingdom.com showed how much time my page loads were taking because of a syntax highlighting plugin–and I rarely post code so it was a really not worth it.
I like the idea of inserting code blocks as pure html in the post because you aren’t required to have that plugin in the future and I’d assume won’t impact page load times.
NOTE: This answer was originally posted at StackOverflow.com by John Poelstra
- Ellen answered 13 years ago
- You must login to post comments
I use WP-syntax for WordPress. Works great for me.
It’s not exactly what you are looking for but I thought I’d mention it here if anyone is looking for syntax hightlighting in WordPress.
From the usage description:
Wrap code blocks with <pre lang=”LANGUAGE” line=”1″> and </pre>
where LANGUAGE is a GeSHi supported
language syntax.
The line attribute is optional.
NOTE: This answer was originally posted at StackOverflow.com by windyjonas
- Jerry answered 15 years ago
- You must login to post comments