How to add programming code in blog?
Posted by
Raju Kumar
Labels:
Add code in blog
,
Add HTML to blog
,
How to add programming code in blog?
This post is really useful for all blogger.I hope many blogger tried to get such a tool or software to help to add code blocks in blog post.I was also searching such a tool but finally I got from my Serbian friend Milan.This tool is Syntax highlighter.
I will let you know how to use syntax highlighter.It is pretty simple.First you need to host this tool somewhere which allow JavaScript.I use hotlinkfiles.com for hosting and my friend has hosted on 110mb.com.
1)You can download Syntax highlighter from this location free -Download Syntax highlighter
2)These are codes that I have hosted on Hotlinks.
http://www.hotlinkfiles.com/files/2713756_wrmly/shBrushVb_1.jsFeel free to use them, I'm not intending to move or remove them.
http://www.hotlinkfiles.com/files/2713757_cwt4k/shBrushPhp_1.js
http://www.hotlinkfiles.com/files/2713758_m2v8x/shBrushJava_1.js
http://www.hotlinkfiles.com/files/2713759_v9dop/shBrushCss_1.js
http://www.hotlinkfiles.com/files/2713760_fi8zr/shCore_1.js
http://www.hotlinkfiles.com/files/2713761_j55bj/shBrushCpp_1.js
http://www.hotlinkfiles.com/files/2713762_a7pat/shBrushPython_1.js
http://www.hotlinkfiles.com/files/2713764_7lh5b/shBrushJScript_1.js
http://www.hotlinkfiles.com/files/2713765_axi1z/shBrushSql_1.js
http://www.hotlinkfiles.com/files/2713766_fivl3/shBrushDelphi_1.js
http://www.hotlinkfiles.com/files/2713767_a86yl/shBrushRuby_1.js
http://www.hotlinkfiles.com/files/2713768_9yi2a/clipboard.swf
http://www.hotlinkfiles.com/files/2713769_ldg1e/shBrushXml_1.js
http://www.hotlinkfiles.com/files/2713770_vz878/shBrushCSharp_1.js
http://www.hotlinkfiles.com/files/2713771_riggt/SyntaxHighlighter.css
3)After that you add below code in your blogger XML code before </ body > .Modify this based on your hosting link or use directly.
<link type="text/css" rel="stylesheet" href="http://www.hotlinkfiles.com/files/2713771_riggt/SyntaxHighlighter.css" />4)Use HTML Escaper at my blog-webandcomputer.blogspot.com to escape html code.
<script language="javascript" src="http://www.hotlinkfiles.com/files/2713760_fi8zr/shCore_1.js"></script>
<script language="javascript" src="http://www.hotlinkfiles.com/files/2713758_m2v8x/shBrushJava_1.js"></script>
<script language="javascript" src="http://www.hotlinkfiles.com/files/2713769_ldg1e/shBrushXml_1.js"></script>
<script language="javascript" src="http://www.hotlinkfiles.com/files/2713757_cwt4k/shBrushPhp_1.js"></script>
<script language="javascript" src="http://www.hotlinkfiles.com/files/2713759_v9dop/shBrushCss_1.js"></script>
<script language="javascript">
dp.SyntaxHighlighter.ClipboardSwf = 'http://www.hotlinkfiles.com/files/2713768_9yi2a/clipboard.swf';
dp.SyntaxHighlighter.BloggerMode(); //fix for blogger adding to lines
dp.SyntaxHighlighter.HighlightAll('code');
</script>
5) This is sample example.It supports most programming language.
System.out.println("This is Raju from showerofmoney.com");Once you download Syntax highlighter,go through steps to follow.
Cheers!!!!!you done.Please add our link http://webandcomputer.blogspot.com to your website.
If you like our post,please subscribe our newsletter and share this post.
(Note-To know more details about Part time Jobs,Business and Home jobs,Visit here)
Related Posts by Categories
Contact Us(Send your suggestion)
Subscribe to:
Post Comments (Atom)
August 11, 2009 at 12:13 AM
Really fabulous man..I was searching such a tag cloud but finally i found at this website.Thanks.
Post a Comment