no

How to use syntaxhighlighter v3.0.83 on blogger

The previous version of syntaxhighlighter uses flash to render the code, but in this version they are only using javascript. Here's...


The previous version of syntaxhighlighter uses flash to render the code, but in this version they are only using javascript.

Here's how I integrated syntaxhighlighter to this blogger blog.

Sample Source Code
<pre class="brush: java">
public static void main(String args[]) {
  void helloWorld() {
    System.out.println("Hello World!);
  }
}
</pre>


What needs to be included, I used syntaxhighlighter hosted files:
Make sure to add these files before the </body> tag.
<!-- syntax highlighter -->
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.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/shAutoloader.js' type='text/javascript'/>
<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'/>
<!-- /syntax highlighter -->

<!-- Add-in Script for syntax highlighting -->  
<script language='javascript'>  
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.all();
</script>  

Post a Comment Default Comments

Outsourcing

Are you looking for freelancers in the Philippines? Get in touch.

Donations

If you like what I do, you can support this channel by buying me a coffee. I would be grateful for your contribution! Your donations will help me create more FREE online courses and learning materials for programmers and remote workers.

item