Googled around to find out how to insert code snippet into the blog..
Here's the workaround:
1.In the blogger,Click on Layout tab ->Edit HTML and put following things Before </head>
<link href='http://syntaxhighlighter.googlecode.com/svn/trunk/Styles/SyntaxHighlighter.css' rel='stylesheet' type='text/css'/>
<script language='javascript' src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js'/>
<script language='javascript' src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCpp.js'/>
2. put following things Before </body>
<script language="javascript">
dp.SyntaxHighlighter.BloggerMode();
dp.SyntaxHighlighter.HighlightAll('code');
</script>
3. encode (HTML Encode) your source code. for this, you can use this.
OR
Copy your code in notepad and replace all < in < etc.
4. Put your updated code between:
<pre name="code" class="Cpp">
//Put your code here
</pre>
Result as below:
function Abc() {
}
Fuyoh, keep the hard work
ReplyDeleteFuyoh, keep the hard work too. Please update your blog frequently :P
ReplyDelete