How to formatting Code Snippets to blogger Post with Syntaxhighlighter

Intoduction about Post:

I am a Enthuastic blogger and a passionate writer. By proffesion I am a ‘PHP Magento Developer’ and  I always help others to share my best knowledge and Tips. So, I started to write a blogs and choose Blogger as my blogging engine for a couple of weeks. Blogger is a one of the best option which also pay you if you are using Google Adsense Services in your blog. Let be keep this topic away and focus on what you facing main problem when you are writing about development or Code Snippests blog. When you are trying to add HTML, Javascript or PHP code snippest into your blog post then it will become very diffuclt that it looks perfectly as it looks in your normal PHP editor. Using SyntaxHighlighter Javascript Library, it will become very easy to Highlight any HTML, Javascript or PHP code in a better way.

Add Syntax Highlighter to Blogger Template:

Copy the following code
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


paste above code into your Blogger Template just above the </head>
tag Save the template Then you can start creating code blocks in your existing or new Blog entries.

Just add below code to format your PHP, HTML or Javascript Code:

<pre class="brush: php; html-script: true">
       <!-- your code here -->
</pre>

You can read more about SyntaxHighlighter configuration option and implement your best method.

Source: http://www.craftyfella.com/2010/01/syntax-highlighting-with-blogger-engine.html 

Post a Comment

1 Comments