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 Manoli.net. 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 ?

16 comments:

Unknown said...


This technical post helps me to improve my skills set, thanks for this wonder post I expect your upcoming blog, so keep sharing..
Regards,
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.
php

Unknown 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.
Regards,
ccna course in Chennai|ccna training in Chennai|ccna training institute in Chennai

Unknown said...
This comment has been removed by the author.
Unknown 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.

Unknown 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

Unknown 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

Unknown 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

Nandhini 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

Anonymous said...

It is very nice blog to improve my knowledge. Thanks for sharing this awesome blog.
Digital marketing course Chennai | Digital Marketing Training

Unknown said...

Very informative
QTP Training In Chennai

Anonymous said...

Thank you for providing such an awesome article and it is very useful blog for others to read.
PHP Training in Delhi
PHP Course in Delhi

apptechnoservices said...

AppTechno Services best training center in delhi provides placement solution to the participants. Training courses in Delhi with placement assistance. Computer Software Training Institutes For Java, Software Testing Institutes. Training and skills development have become essential ingredients in ensuring the efficiency of service staff.

r language course in Delhi, Dwarka
best machine learning course
python course in Delhi, Dwarka
Ruby on Rails Training in Delhi
best php training institute in Dwarka
php training in delhi

IICS Computer Education said...

Thanks For Sharing Informative Blog... Keep Posting Best Python Training Institute in Delhi

Thakur98 said...

Iamlinkfeeder
Iamlinkfeeder
Iamlinkfeeder
Iamlinkfeeder
Iamlinkfeeder
Iamlinkfeeder
Iamlinkfeeder
Iamlinkfeeder
Iamlinkfeeder
Iamlinkfeeder