## Sunday, July 7, 2013

### How to show code snippets in Blogger

Information taken from this blog.

This works for now, don't know if it will be optimal. See also this blog; these may be better?



SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf';
SyntaxHighlighter.all();


Then you can use <pre> tag for code.
<pre class="brush: cpp">
int x = 2;
</pre>

gives
int x = 2;


#### 1 comment:

1. thank it's work for me :)

welcome to my blog http://www.th3guide01.com/