Sunday 28 July 2013

How to use syntax Highlighter in blogger

If you are a Developer and do blogging and post your code inside your blog, you want to have it display nicely and also it will help others see your post with smiling face.

There are some utility for this, called syntax highlighter. We can use it in blogger, just insert some javascript in your HTML Head in your blogger template. The code base on JavaScript and almost every blog I found use it. Here are the code to add :






The main file is the shCore.css , shCore.js

Then in your code just add <pre class="brush: js"></pre>

And make sure the javascript is called :





If you also want to contribut to the development or just want to see what happening inside the code just go to SyntaxHighlighter GitHub 

The Brush type supported are here

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More