To get SyntaxHighlighter to work on you page, you need to do the following:
1.Add base files to your page: shCore.js and shCore.css
3.Include shCore.css and shThemeDefault.css
4.Create a code snippet with either <pre /> or <script /> method (see below)
<pre /> method
ADVANTAGES: Works everywhere, graceful fallback if there are script problems, shows up in all RSS readers as regular <pre />
PROBLEMS: Major issue with this method is that all right angle brackets must be HTML escaped, eg all < must be replaced with < This will ensure correct rendering.
SyntaxHighlighter looks for <pre /> tags which have a specially formatted class attribute. The format of the attribute is the same as the CSS style attribute. The only required parameter is brush (see configuration), which should be set as one of the brush aliases
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
24 Experts available now in Live!