Revision history for SyntaxHighlighter


Revision [22898]

Last edited on 2016-05-20 07:38:42 by DarTar [Replaces old-style internal links with new pipe-split links.]
Additions:
This page can now be found on the [[Docs:SyntaxHighlighter | Wikka Documentation Server]].
An archive of [[http://wikkawiki.org/SyntaxHighlighter/revisions | old revisions of this page]] is still available for reference.<<
Deletions:
This page can now be found on the [[Docs:SyntaxHighlighter Wikka Documentation Server]].
An archive of [[http://wikkawiki.org/SyntaxHighlighter/revisions
old revisions of this page]] is still available for reference.<<


Revision [18109]

Edited on 2008-01-27 02:34:53 by DarTar [Migrated to doc server]
Additions:
<<===This page has moved===
This page can now be found on the [[Docs:SyntaxHighlighter Wikka Documentation Server]].
Thanks for updating your bookmarks!
An archive of [[http://wikkawiki.org/SyntaxHighlighter/revisions
old revisions of this page]] is still available for reference.<<
CategoryMigratedDocs
Deletions:
[[WikkaDocumentation Wikka Documentation]]
===== Syntax Highlighting for Code Blocks=====
//GeSHi is included in Wikka since version 1.1.6.0.//
>>**See Wikka in action:**
~-""<a href="http://wikkawiki.org/WikkaInAction#hn_7._Adding_a_code_block">Adding a code block</a>"" {{image url="images/action/qt.gif" alt="quicktime icon" title="Wikka clips"}}
==See also:==
~-Development: WikkaGeshiIntegration.
~-[[ThirdPartyInfo Third-party software bundled with Wikka]]
~-FormattingRules for the usage
>>This is the documentation page for the syntax highlighter.
{{image alt="Code highlighting sample" title="GeSHi support" url="images//features/code_highlighting.jpg"}}
[[http://qbnz.com/highlighter/ 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.
==Setting a file name for download==
If you specify a filename, this will be used for downloading the code.
==Available formatters==
The following formatters are available:
**from [[http://qbnz.com/highlighter/ 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 [[http://qbnz.com/highlighter/ GeSHi]]==
""%%(php;1) PHP code with line-numbers%%:""
%%(php;1)
<?php
phpinfo();
$text = "Hello, World!";
print $text;
?>
%%
""%%(css) CSS code%%""
%%(css)
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;129) JavaScript code starting on line 129%%""
%%(javascript;129)
function fKeyDown()
{
if (event.keyCode == 9)
{
event.returnValue = false;
document.selection.createRange().text = String.fromCharCode(9);
}
}
%%
""%%(php;1;test.php)""
will result in a downloadable file called test.php.txt - line number starting on line 1 (note, this won't work on wikkawiki.org for now!)
==Wikka built-in highlighter==
Line numbers are not supported here.
""%%(ini) INI file contents%%:""
%%(ini)
; 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%%:""
%%(email)
Hi!
>>>> My Llama loves foot massage.
>>> You really think so?
>> Yes, I know he does.
>Are you sure?
Of course, yes!
Mr. Scruff
%%
""%%code%%:""
%%
int main(int arc,char **argv)
{
printf("Hello, %s!
", (argc>1) ? argv[1] : "World");
return 0;
}
%%
CategoryDocumentation


Revision [17018]

Edited on 2007-05-31 23:27:42 by DarTar [Reverted]
Additions:
- ""C++"" (cpp)
Name=Munin++ Menu
Description=Munin++ Menu
Deletions:
- ""C "" (cpp)
Name=Munin Menu
Description=Munin Menu


Revision [16817]

Edited on 2007-05-31 10:50:34 by EltTzx [Reverted]
Additions:
- ""C "" (cpp)
Name=Munin Menu
Description=Munin Menu
Deletions:
- ""C++"" (cpp)
Name=Munin++ Menu
Description=Munin++ Menu


Revision [15000]

Edited on 2006-08-01 11:47:39 by DarTar [changing folder for miniscreenshots]
Additions:
~-""<a href="http://wikkawiki.org/WikkaInAction#hn_7._Adding_a_code_block">Adding a code block</a>"" {{image url="images/action/qt.gif" alt="quicktime icon" title="Wikka clips"}}
{{image alt="Code highlighting sample" title="GeSHi support" url="images//features/code_highlighting.jpg"}}
Deletions:
~-""<a href="http://wikka.jsnx.com/WikkaInAction#hn_7._Adding_a_code_block">Adding a code block</a>"" {{image url="images/action/qt.gif" alt="quicktime icon" title="Wikka clips"}}
{{image alt="Code highlighting sample" title="GeSHi support" url="images/code_highlighting.jpg"}}


Revision [14981]

Edited on 2006-07-29 09:19:33 by NilsLindenberg [small update]
Additions:
==Setting a file name for download==
If you specify a filename, this will be used for downloading the code.
""%%(php;1;test.php)""
will result in a downloadable file called test.php.txt - line number starting on line 1 (note, this won't work on wikkawiki.org for now!)


Revision [11382]

Edited on 2005-10-12 08:59:42 by DarTar [adding screenshot]
Additions:
===== Syntax Highlighting for Code Blocks=====
>>This is the documentation page for the syntax highlighter.
{{image alt="Code highlighting sample" title="GeSHi support" url="images/code_highlighting.jpg"}}
::c::
Deletions:
===== Wikka Syntax Highlighter =====
>>This is the documentation page for the syntax highlighter.::c::


Revision [11379]

Edited on 2005-10-12 08:46:33 by DarTar [links]
Additions:
Usage: ##""%%(formatter[;line-number]) code %%""##
Deletions:
Usage: ""%%(formatter[;line-number]) code %%""


Revision [11378]

Edited on 2005-10-12 08:46:01 by DarTar [link]
Additions:
>>**See Wikka in action:**
~-""<a href="http://wikka.jsnx.com/WikkaInAction#hn_7._Adding_a_code_block">Adding a code block</a>"" {{image url="images/action/qt.gif" alt="quicktime icon" title="Wikka clips"}}
==See also:==
Deletions:
>>==See also:==


Revision [8995]

Edited on 2005-06-08 14:25:55 by JavaWoman [adding starting line number to an example]
Additions:
""%%(javascript;129) JavaScript code starting on line 129%%""
%%(javascript;129)
Line numbers are not supported here.
Deletions:
""%%(javascript) JavaScript code%%""
%%(javascript)


Revision [5891]

Edited on 2005-02-10 19:58:51 by JavaWoman [minor]
Additions:
//GeSHi is included in Wikka since version 1.1.6.0.//
~-Development: WikkaGeshiIntegration.
~-[[ThirdPartyInfo Third-party software bundled with Wikka]]
~-FormattingRules for the usage
>>This is the documentation page for the syntax highlighter.::c::
Deletions:
//Included in Wikka since version 1.1.6.0.//
Development: WikkaGeshiIntegration.
[[ThirdPartyInfo Third-party software bundled with Wikka]]
FormattingRules for the usage
>>::c::This is the documentation page for the syntax highlighter.


Revision [5884]

Edited on 2005-02-10 18:39:27 by NilsLindenberg [added doc-link + headers]
Additions:
==Line-numbers==
==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==


Revision [5827]

Edited on 2005-02-09 15:09:52 by NilsLindenberg [added link to formatting rules + line numbering]
Additions:
[[WikkaDocumentation Wikka Documentation]]
----
===== Wikka Syntax Highlighter =====
//Included in Wikka since version 1.1.6.0.//

>>==See also:==
Development: WikkaGeshiIntegration.
[[ThirdPartyInfo Third-party software bundled with Wikka]]
FormattingRules for the usage
>>::c::This is the documentation page for the syntax highlighter.

[[http://qbnz.com/highlighter/ GeSHi]] is now hooked into Wikka.

Usage: ""%%(formatter[;line-number]) code %%""

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.

The following formatters are available:

**from [[http://qbnz.com/highlighter/ 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 [[http://qbnz.com/highlighter/ GeSHi]]==

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

""%%(css) CSS code%%""
%%(css)
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%%""
%%(javascript)
function fKeyDown()
{
if (event.keyCode == 9)
{
event.returnValue = false;
document.selection.createRange().text = String.fromCharCode(9);
}
}
%%

==Wikka built-in highlighter==

""%%(ini) INI file contents%%:""
%%(ini)
; 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%%:""
%%(email)
Hi!
>>>> My Llama loves foot massage.
>>> You really think so?
>> Yes, I know he does.
>Are you sure?

Of course, yes!

Mr. Scruff
%%

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


----
Deletions:
[[WikkaDocumentation Wikka Documentation]]
----
===== Wikka Syntax Highlighter =====
//Included in Wikka since version 1.1.6.0.//

>>==See also:==
Development: WikkaGeshiIntegration.
[[ThirdPartyInfo Third-party software bundled with Wikka]]
>>::c::This is the documentation page for the syntax highlighter.

[[http://qbnz.com/highlighter/ GeSHi]] is now hooked into Wikka.

Usage: ""%%(formatter) code %%""

The following formatters are available:

**from [[http://qbnz.com/highlighter/ 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 [[http://qbnz.com/highlighter/ GeSHi]]==

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

""%%(css) CSS code%%""
%%(css)
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%%""
%%(javascript)
function fKeyDown()
{
if (event.keyCode == 9)
{
event.returnValue = false;
document.selection.createRange().text = String.fromCharCode(9);
}
}
%%

==Wikka built-in highlighter==

""%%(ini) INI file contents%%:""
%%(ini)
; 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%%:""
%%(email)
Hi!
>>>> My Llama loves foot massage.
>>> You really think so?
>> Yes, I know he does.
>Are you sure?

Of course, yes!

Mr. Scruff
%%

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


----


Revision [4799]

Edited on 2005-01-18 10:03:01 by DarTar [Adding link]
Additions:
Development: WikkaGeshiIntegration.
[[ThirdPartyInfo Third-party software bundled with Wikka]]
>>::c::This is the documentation page for the syntax highlighter.
Deletions:
Development: WikkaGeshiIntegration.>>This is the documentation page for the syntax highlighter.
[[ThirdPartyInfo Third-party software bundled with Wikka]]>>::c::


Revision [4798]

Edited on 2005-01-18 10:01:58 by DarTar [Adding link]
Additions:
[[ThirdPartyInfo Third-party software bundled with Wikka]]>>::c::
Deletions:
[[ThirdPartyInfo Third-party software bundled with Wikka]]::c::


Revision [4797]

Edited on 2005-01-18 10:01:12 by DarTar [Adding link]
Additions:
Development: WikkaGeshiIntegration.>>This is the documentation page for the syntax highlighter.
[[ThirdPartyInfo Third-party software bundled with Wikka]]::c::
Deletions:
Development: WikkaGeshiIntegration.>>This is the documentation page for the syntax highlighter.::c::


Revision [4439]

Edited on 2005-01-11 11:55:30 by JavaWoman [added code for html highlighting (html4strict)]
Additions:
- HTML (html4strict)
Deletions:
- HTML


Revision [4431]

Edited on 2005-01-11 09:55:00 by DarTar [Formatting as a doc page]
Additions:
//Included in Wikka since version 1.1.6.0.//
>>==See also:==
Development: WikkaGeshiIntegration.>>This is the documentation page for the syntax highlighter.::c::
CategoryDocumentation
Deletions:
{{lastedit}}
Give it a thorough testing, and if all is well, it will be released in the upcoming version. -- JsnX
''Testing done - see WikkaGeshiIntegration. --JavaWoman''
CategoryDevelopment CategoryDocumentation


Revision [3179]

Edited on 2004-12-14 19:05:28 by JavaWoman [reference to WikkaGeshiIntegration]
Additions:
[[WikkaDocumentation Wikka Documentation]]
~-php (taken care of by ""GeSHi"", if present)
Note that ""GeSHi"" syntax highlighting takes precedence over built-in syntax highlighting.
''Testing done - see WikkaGeshiIntegration. --JavaWoman''
Deletions:
[[HelpInfo Wikka Documentation]]
~-php (taken care of by GeSHi, if present)
Note that GeSHi syntax highlighting takes precedence over built-in syntax highlighting.


Revision [3156]

Edited on 2004-12-14 16:33:26 by JavaWoman [small edit; precedence]
Additions:
~-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.
Deletions:
~-unknown code, plain text


Revision [3045]

Edited on 2004-12-09 20:07:48 by JavaWoman [JS and CSS examples, some reorganization]
Additions:
**from [[http://qbnz.com/highlighter/ GeSHi]]:**
**built-in:**
~-INI file
~-email (with quotation indentation)
~-unknown code, plain text
==highlighted with [[http://qbnz.com/highlighter/ GeSHi]]==
""%%(php) PHP code%%:""
$text = "Hello, World!";
print $text;
?>
""%%(css) CSS code%%""
%%(css)
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%%""
%%(javascript)
function fKeyDown()
if (event.keyCode == 9)
{
event.returnValue = false;
document.selection.createRange().text = String.fromCharCode(9);
}
==Wikka built-in highlighter==
""%%(ini) INI file contents%%:""
""%%(email) Email message%%:""
Deletions:
""%%(ini) INI file contents%%:""
""%%(php) PHP code%%:""
= "Hello, World!
";
print "";?>
""%%(email) Email message%%:""


Revision [3026]

Edited on 2004-12-09 15:48:53 by NilsLindenberg [examples added]
Additions:
===Examples===
""%%code%%:""
%%
int main(int arc,char **argv)
{
printf("Hello, %s!
", (argc>1) ? argv[1] : "World");
return 0;
}
%%
""%%(ini) INI file contents%%:""
%%(ini)
; 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
%%
""%%(php) PHP code%%:""
%%(php)
<?php
phpinfo();
= "Hello, World!
";
print "";?>
%%
""%%(email) Email message%%:""
%%(email)
Hi!
>>>> My Llama loves foot massage.
>>> You really think so?
>> Yes, I know he does.
>Are you sure?
Of course, yes!
Mr. Scruff
%%


Revision [2603]

The oldest known version of this page was created on 2004-11-29 04:33:02 by JsnX [examples added]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki