Syntax highlighter is the best plugin that helps to show the code using in daily life.Showing code is better using syntax highlighter.One of the best plugin of syntax highlighter was developed by alexgorbatchev .He says that

SyntaxHighlighter is a fully functional self-contained code syntax highlighter developed in JavaScript. To get an idea of what SyntaxHighlighter is capable of, have a look at the demo page.

If you want to use the syntax highlighter in a blog then its free.Just you need to integrate it in Blog like this.

Why to choose  alexgorbatchev Syntax Highlighter.

  • Selected theme
  • Good Background
  • Easy to Install
  • Many Function like able to Print
  • Numbering of sentence
  • Many Brushes
  • Supports many programming language as your choice

Adding Syntax Highlighter in Template.

In Blogger.

  1. Go to Blogger.com
  2. Click on design or Template.
  3. Go to Edit HTMl.
  4. Find </body> tag from there.
  5. Adding the following lines just above it.
    <!--syntax highlighter -->
    <!-- http://bloggerrounder.blogspot.com -->
    <link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/> 
    <link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/> 
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'/> 
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'/> 
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js' type='text/javascript'/> 
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'/> 
    <script type='text/javascript'>
    SyntaxHighlighter.config.bloggerMode = true;
    SyntaxHighlighter.all();
    </script>
    <!-- http://bloggerrounder.blogspot.com -->
    <!-- syntax highlighter -–>
  6. Where
    1. Line 4 is theme of syntax highlighter.(if you don’t like you can change theme for that go to here).Choose the theme which you like the replace shThemeDefault.css with the name of respective theme.
    2. Line 6,7 and 8 are the brushes.If you want to required only one brush then you can delete others.You may add the brushes.At least there should be one brushed.
  7. If you got any problem you are free to comments.

If you are using custom domain

  • If you use Custom Domain in Blogger host your CSS and JavaScript files on Google Sites. Because . .css and .js files only work on blogspot domain.
    To make .js work in custom domain you have to change the extension to .txt.
    As for .css files, you have to host it somewhere else.

In Word Press.

  1. Download the Plugins from here .
  2. Extract the zip file.
  3. Upload the folder in  /wp-content/plugins/ using ftp like filezille.
  4. Go to The Admin area and activate the Plugin.
    syntaxhighlighter screenshot 2
  5. Just wrap your code in [brush], such as [CSS]code here[/CSS] or [xhtml] xml,html code here [xhtml] while posting
    syntax-highlighter-compress screenshot 2

Showing code using it..

  1. Escape the code using HTML encoder.
  2. While posting wrap the code (Switching to HTML Mode) like this
    <pre class="brush: js">
    Escaped Code Here
    </pre>

If you use Window Live writer.

If you use window live writer then install this plugin as it escape and make compatible to work with syntax highlighter.
image_thumb2

Image Credit : Word press plugin Store

Admin of Blogger Rounder
Shirshak is the Administrator of the Blogger Rounder who thinks he will die next to Blogger. He is Completely devoted to Blogger and thinks Web Designing will makes is career.You contact using contact form from navigation tab to him.You can find him in Twitter.

Subscribe for free
Thanks for visiting Blogger Rounder.We can subscribe to Blogger Rounder's by RSS feed or email updates.

4 comments on "Showing Codes Using Syntax Highlighter Plugin.":

Tonsil Apple, Saturday, February 18, 2012

it doesnt works in my blog.

Tonsil Apple, Monday, February 20, 2012

oh now i understood . thanks for that green bajgain.

Shirshak Bajgain, Friday, January 11, 2013

Thanks for comment to everyone

Post a Comment

We Love To Hear Comments from You.Comments are Welcome.You can comment here regarding this Post.If it is not related with the post you can ask a question by Contacting Us.Before Comment Please Subscribe To our RSS or email updates.Publishing Spam Comment is Not allowed.If you want to Add Code then Please Encode it.
Simple Tags like <a> ,<strong>,<b>,<em> and <i> are allowed for preventing spam

Newer page Older Pager Home Pager

Pls share this page

Get this
Copyright © 2012 Blogger Rounder .Designed by Shirshak.
back to top