rasti.hil@hilandco.com +41 79 367-9677

Search This Blog

SyntaxHighlighter is now included into blog.hilandco.com

This blog entry is primarily for bloggers at Hil & Co IT Solutions.


FUNCTION SyntaxHighlighter() RETURN BOOLEAN AS
L_STRING VARCHAR2(256);
BEGIN
L_STRING := 'form now syntax highlighting is available';
-- below I'll describe how to use it
RETURN TURE;
END SyntaxHighlighter;

Step 1) go to SyntaxHighlighter Home Page to get familiar with SyntaxHighlighter.

Step 2) go to SyntaxHighlighter:Brushes to see available brushes.

Step 3) If you want to include some of this brushes into our blog:
      Go to Blog Dashboard -> Layout -> Edit HTML - > Edit Template, and scroll down until

...
<!-- **************************************************************************************************************** -->
<!-- SyntaxHighlighter START -->
<!-- BEGIN: MUST HAVE SECTION -->
<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'/>
<script language='javascript' src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js'/>
<!-- END: MUST HAVE SECTION -->

<!-- BEGIN: list of enabled brushes -->

<!-- javascript -->
<script language='javascript' src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js'/>
<!-- bash -->
<script language='javascript' src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushBash.js'/>

<!-- END: list of enabled brushes -->
<!-- BEGIN: MUST HAVE SECTION -->
<script type='text/javascript'>
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf';
SyntaxHighlighter.all();
</script>
<!-- END: MUST HAVE SECTION -->
<!-- SyntaxHighlighter END-->
<!-- **************************************************************************************************************** -->
...

Step 4) create link for brush what will be newly included
      New link shoul look like tihs

<script language='javascript' src='http://alexgorbatchev.com/pub/sh/current/scripts/FILENAME'/>

where FILENAME should be equal to File name column at Step 2)

Step 5) the highlighted source should be enclosed in a HTML <pre> tag as the following example shows:

<pre class="brush: BRUSH_ALIASE">
  // some code
<pre/>

where BRUSH_ALIASE should be equal to Brush aliases column at Step 2)

Note[1]: I that you use Html Editing instead of Compose editing.
Note[2]: Using long string eg. <!-- ***...*** --> will not cause wrapping.
Note[3]: Thanks for Hosting and Developing to Alex .

janos.ujvari @02.02.2010