Saturday, September 27, 2008

Syntax Highlight/Format C#, Java, PHP Code in Blogger

The method I used to put syntax highlighted code in my blog is to use the "Code Format" tool provided by It works fine but I am just lazy to convert my code every time I post a new entry.

I then try to find another solution. One option is to use SyntaxHighlighter, a Java Script library that does all the syntax highlight jobs for you.

After installation, one problem I faced is that all the "new line" I wrote in "Edit Html" of Compose Page in Blogger are converted to "
". That's not very nice : (

Like everytime, I performed a search and found a good solution here, Using SyntaxHighlighter on BLOGGER. The purpose of additional script is to convert all the "
" found in the code to "new line" chracter. It works fine and here is my sample of highlighted Java code.

(Of course, I will not use silly program like Hello World for this :D )

And here is the result:

Simple, isn't it ?


Andria BZ said...

Great Post, Actually PHP is a beautiful source for developing a database driven web application, I love this post, thanks for spending your time for discussing about this topic.
PHP Course in Chennai

Amirtha rao said...

This technical post helps me to improve my skills set, thanks for this wonder post I expect your upcoming blog, so keep sharing..
Web designing course in chennai|Web design training in chennai

dev2one said...

PHP or Hypertext Preprocessor is the most preferred programming language in the world, used for dynamic website
development and web based applications. This server side scripting language has been used to develop some of the
most popular website such as Facebook and Wikipedia.

kovalan Jayamurugan said...

I agree with your thoughts!!! As the demand of java programming application keeps on increasing, there is massive demand for java professionals in software development industries. Thus, taking training will assist students to be skilled java developers in leading MNCs. J2EE Training in Chennai | JAVA Training Institutes in Chennai

Harshita said...

Thank you for this informative post. We provide JAVA training in Chennai for students interested in JAVA training in Chennai. So any aspiring students to join JAVA training in Chennai can contact us.

jhansi joe said...

The information you have given here is truly helpful to me. CCNA- It’s a certification program based on routing & switching for starting level network engineers that helps improve your investment in knowledge of networking & increase the value of employer’s network, so if you have an wish to take training on CCNA.
ccna course in Chennai|ccna training in Chennai|ccna training institute in Chennai

Rahul said...

Hello Admin, thank you for the informative post. At Fita academy, we provide the best IT trainings for various courses. You can check our Fita reviews page to know more about our quality and standards.

Raghu Sharma said...
This comment has been removed by the author.
Raghu Sharma said...

Hello, I'am running a PHP training center in Chennai, I found this post very useful and i have gained some extra knowledge which helped me and my students. Keep educating and keep sharing
Raghu Sharma.

MST : Software Company Institute said...

I like to work on PHP rather than .NET, though .NET presents the ability of drag and drop elements, however I like PHP a lot.thanks for sharing the post.
php training in jaipur

Dhivya Shree said...

The main thing which i like about web designing is that itneeds creativity and we need to work differently acccording to our clients need this needs a creativity and innovation.
web designing course in chennai|web designing training in chennai|web designing courses in chennai

Dhivya Shree said...

As the world is constantly getting advanced digitally for every brand or a company it is very improtant to mark their presence online. not only to mark their presence they also have to be very active on the web so that they can have a conversation with their clients/customers and solve their problems or improve their service.
Digital Marketing Training in Chennai

Dhivya Shree said...

If you are willing to develop a website but you dont know web development or coding then relax wordpress CMS platform is just for you. Where you can create website all by yourself.
wordpress training in chennai | Wordpress course in chennai | FITA Academy reviews

Nikshitha S said...

Excellant content. If you are interested in studying and knowing the details of SAS course visit this website. SAS is an analytical tool which is created by SAS system for the data storage and analytical purpose. It is an integrated software system that is used for data entry, retrieval and management of data.
SAS Training in Chennai | SAS Course in Chennai

Rajeev Kumar said...

Nice post!! Thanks for sharing this information and keep updating us.

Oracle BI Obiee Training Institute in Delhi
MySQL Training in Delhi
Oracle Apps Training Institute in Delhi