Sunday, December 28, 2008

How to add syntax highlighting to you blog

For syntax highlighting I chose the project: SyntaxHighlighter After you log in to your account, go to Layout -> Edit Html At the end of css declaration add the css from svn trunk as shown in the image above. Next, go to the end of your template html, and add the following code:
//these are src for script language javascript tag which I cannot write here:

//wrap this in a script tag
dp.SyntaxHighlighter.ClipboardSwf ='';

Scripts in html documents And here is a sample php usage:
$var = 'Sample usage';
#comment here

No comments: