Revision [4798]

This is an old revision of SyntaxHighlighter made by DarTar on 2005-01-18 10:01:58.

 

WikkaDocumentation Wikka Documentation

Wikka Syntax Highlighter

Included in Wikka since version 1.1.6.0.

This is the documentation page for the syntax highlighter.
ThirdPartyInfo Third-party software bundled with Wikka
 


GeSHi is now hooked into Wikka.

Usage: %%(formatter) code %%

The following formatters are available:

from GeSHi:
  • Actionscript
  • ADA
  • Apache Log (apache)
  • ASM
  • ASP
  • Bash
  • C
  • C for Macs (c_mac)
  • C# (csharp)
  • C++ (cpp)
  • CAD DCL (caddcl)
  • CadLisp
  • CSS
  • Delphi
  • HTML (html4strict)
  • Java
  • Javascript
  • Lisp
  • Lua
  • NSIS
  • Objective C (objc)
  • OpenOffice BASIC (oobas)
  • Pascal
  • Perl
  • PHP
  • Python
  • Q(uick)BASIC (qbasic)
  • Smarty
  • SQL
  • VB.NET (vbnet)
  • Visual BASIC (vb)
  • Visual Fox Pro (visualfoxpro)
  • XML

built-in:
  • INI file
  • email (with quotation indentation)
  • php (taken care of by GeSHi, if present)
  • code, unknown language, plain text

Note that GeSHi syntax highlighting takes precedence over built-in syntax highlighting.

Examples


highlighted with GeSHi

%%(php) PHP code%%:
<?php
phpinfo();
$text = "Hello, World!";
print $text;
?>


%%(css) CSS code%%
body {
    font-family: "Trebuchet MS", Georgia, serif;
    font-size: .9em;
    line-height: 1.4em;
    font-weight: normal;
    color: #000000;
    background-image: url(../images/wikkalight.jpg);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: #000;
    margin: 0px;
}


%%(javascript) JavaScript code%%
function fKeyDown()
{
    if (event.keyCode == 9)
    {
        event.returnValue = false;
        document.selection.createRange().text = String.fromCharCode(9);
    }
}


Wikka built-in highlighter

%%(ini) INI file contents%%:
; Menu specification file for Opera 7.0

[Version]
File Version=2

[Info]  #background info
Name=Munin++ Menu
Description=Munin++ Menu
Author=NonTroppo (originally by Rijk van Geijtenbeek)
Version=1.9


%%(email) Email message%%:


%%code%%:
int main(int arc,char **argv)
{
	printf("Hello, %s!
", (argc>1) ? argv[1] : "World");
	return 0;
}




CategoryDocumentation
There are 18 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki