pnWikka : SyntaxHighlighter
HomePage :: Categories :: Page Index :: RecentChanges :: Search :: Help :: Login/Register
Wikka Documentation

GeSHi∞ is now hooked into Wikka.
Usage: %%(formatter[;line-number]) code %%
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.
%%(php;1) PHP code with line-numbers%%:
%%(css) CSS code%%
%%(javascript;129) JavaScript code starting on line 129%%
Line numbers are not supported here.
%%(ini) INI file contents%%:
%%(email) Email message%%:
%%code%%:
CategoryDocumentation
Syntax Highlighting for Code Blocks
GeSHi is included in Wikka since version 1.1.6.0.
See Wikka in action:
~-Adding a code block
~-Third-party software bundled with Wikka
~-FormattingRules for the usage
This is the documentation page for the syntax highlighter.~-Adding a code block

See also:
~-Development: WikkaGeshiIntegration.~-Third-party software bundled with Wikka
~-FormattingRules for the usage

GeSHi∞ is now hooked into Wikka.
Usage: %%(formatter[;line-number]) code %%
Line-numbers
If "geshi_line_numbers" in the ConfigurationOptions is enabeld, simply add a ;#number after the language name to have line-numbers starting at #number. See the php-example below.Linking to online documention
If you click on a function name, you get to the entry of this function in the online manual of the language (only for some languages). You can try it out with the php-example below.Available formatters
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;1) PHP code with line-numbers%%:
%%(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;
}
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;129) JavaScript code starting on line 129%%
function fKeyDown()
{
if (event.keyCode == 9)
{
event.returnValue = false;
document.selection.createRange().text = String.fromCharCode(9);
}
}
{
if (event.keyCode == 9)
{
event.returnValue = false;
document.selection.createRange().text = String.fromCharCode(9);
}
}
Wikka built-in highlighter
Line numbers are not supported here.
%%(ini) INI file contents%%:
%%(email) Email message%%:
%%code%%:
int main(int arc,char **argv)
{
printf("Hello, %s!
", (argc>1) ? argv[1] : "World");
return 0;
}CategoryDocumentation

