Redirected from Deki/Extensions/Syntax Highlighter 2.0
Was this page helpful?

Syntax Highlighter 2.0

    Table of contents
    1. 1. Description
    2. 2. Configuration
    3. 3. Functions
      1. 3.1. syntax.as3(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      2. 3.2. syntax.coldfusion(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      3. 3.3. syntax.cpp(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      4. 3.4. syntax.csharp(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      5. 3.5. syntax.css(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      6. 3.6. syntax.dekiscript(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      7. 3.7. syntax.delphi(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      8. 3.8. syntax.diff(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      9. 3.9. syntax.erlang(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      10. 3.10. syntax.groovy(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      11. 3.11. syntax.html(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      12. 3.12. syntax.java(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      13. 3.13. syntax.javafx(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      14. 3.14. syntax.javascript(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      15. 3.15. syntax.perl(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      16. 3.16. syntax.php(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      17. 3.17. syntax.powershell(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      18. 3.18. syntax.python(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      19. 3.19. syntax.ruby(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      20. 3.20. syntax.scala(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      21. 3.21. syntax.shell(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      22. 3.22. syntax.sql(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      23. 3.23. syntax.text(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      24. 3.24. syntax.vb(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      25. 3.25. syntax.xml(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
    4. 4. Script Source

    This extension is based on the work done by Alex Gorbatchev on the syntaxhighlighter project.  Refer here for more information on how to embed this extension.

    How to use the Syntax extension:

    The easiest way to format text using the Syntax extension is to use the Transform menu: create a paragraph using the "formatted" style, paste or write the code you wish to format, then select the appropriate "syntax" transform from the toolbar menu.

    Note in some editors the dropdown is not available, in that case you may need to have to apply the transform manually.  Toggle to HTML/Source mode, find the <pre> element preceding the content to format, and change it to <pre function="syntax.php"> to apply the "syntax.php" transform function.  By default, the contents of the <pre> element are converted into a string and used as the first argument to the function.  You can perform additional operations or supply more parameters using <pre function="syntax.php(string.ToUpper($), true)"> where $ refers to the contents of the <pre> element.

    Once the transform is applied, the formatted paragraph will indicate that its content is dynamically generated.  Save the page.  Once the browser reloads, your content will be formatted with the function you selected.

    Vendor
    MindTouch
    Type Script
    Categories Developer
    Requires MindTouch Core 9.02 or later
    Status Stable
    License Free/Open Source
    Manifest http://scripts.mindtouch.com/syntax2.xml

     

    Install Script
    To add  this script to your site, enter the address of your MindTouch installation (ex: http://www.mindtouch.com) and click the Add Script button.  This will open your control panel and prepopulate the necessary values.  You will still need to manually add configuration settings if required.  Note that no changes are made to your site until you confirm the action in your control panel.
    Your site address:     


    Table of Contents

    1. 1. Description
    2. 2. Configuration
    3. 3. Functions
      1. 3.1. syntax.as3(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      2. 3.2. syntax.coldfusion(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      3. 3.3. syntax.cpp(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      4. 3.4. syntax.csharp(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      5. 3.5. syntax.css(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      6. 3.6. syntax.dekiscript(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      7. 3.7. syntax.delphi(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      8. 3.8. syntax.diff(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      9. 3.9. syntax.erlang(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      10. 3.10. syntax.groovy(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      11. 3.11. syntax.html(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      12. 3.12. syntax.java(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      13. 3.13. syntax.javafx(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      14. 3.14. syntax.javascript(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      15. 3.15. syntax.perl(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      16. 3.16. syntax.php(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      17. 3.17. syntax.powershell(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      18. 3.18. syntax.python(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      19. 3.19. syntax.ruby(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      20. 3.20. syntax.scala(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      21. 3.21. syntax.shell(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      22. 3.22. syntax.sql(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      23. 3.23. syntax.text(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      24. 3.24. syntax.vb(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
      25. 3.25. syntax.xml(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml
    4. 4. Script Source

    Description

    This extension contains functions for highlighting syntax of popular programming languages.

    See also How to add a script, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.


    Configuration

    The following configuration settings are required to run this script (unless shown as optional).

    NameTypeDescription
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark')


    Functions

    syntax.as3(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight ActionScript3 syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.coldfusion(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight ColdFusion syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.cpp(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight C/C++ syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.csharp(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight C# syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.css(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight CSS syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.dekiscript(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight DekiScript syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.delphi(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight Delphi syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.diff(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight Diff syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.erlang(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight Erlang syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.groovy(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight Groovy syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.html(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight HTML syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.java(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight Java syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.javafx(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight JavaFX syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.javascript(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight JavaScript syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.perl(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight Perl syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.php(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight PHP syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.powershell(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight Powershell syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.python(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight Python syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.ruby(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight Ruby syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.scala(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight Scala syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.shell(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight bash/sh/ksh syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.sql(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight SQL syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.text(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Show plain text

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.vb(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight Visual Basic syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    syntax.xml(code : str, collapse : bool, firstline : num, gutter : bool, ruler : bool, toolbar : bool, wrap : bool, theme : str) : xml

    Highlight XML syntax

    Parameters:

    NameTypeDescription
    codestrsource code to highlight
    collapsebool(optional) Allows you to force highlighted elements on the page to be collapsed by default. (default: false)
    firstlinenum(optional) Allows you to change the first (starting) line number. (default: 1)
    gutterbool(optional) Allows you to turn gutter with line numbers on and off. (default: true)
    rulerbool(optional) Allows you to show column ruler on top of highlighted elements. (default: false)
    toolbarbool(optional) Toggles toolbar on/off. (default: true)
    wrapbool(optional) Allows you to turn line wrapping feature on and off. (default: true)
    themestr(optional) Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)


    Script Source

    <extension>
      <title>Syntax Highlighter 2.0</title>
      <label>Syntax</label>
      <copyright>Copyright (c) 2006-2010 MindTouch Inc.</copyright>
      <description>This extension contains functions for highlighting syntax of popular programming languages.</description>
      <uri.help>http://developer.mindtouch.com/App_Catalog/Syntax_Highlighter_2.0</uri.help>
      <namespace>syntax</namespace>
    
      <requires host="MindTouch Core 9.02" />
    
      <config>
        <param name="theme" type="str" default="'Default'">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark')</param>
      </config>
    
      <function>
        <name>format</name>
        <description>Show code using specified syntax formatter.</description>
        <access>internal</access>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <param name="brush" type="str" default="'Plain'">Select highlighting brush.</param>
        <return>
          <html xmlns:eval="http://mindtouch.com/2007/dekiscript">
            <head>
              <link type="text/css" rel="stylesheet" href="self:res/syntax2/shCore.css" />
              <link type="text/css" rel="stylesheet" eval:href="'self:res/syntax2/shTheme' .. ($theme ?? config.theme ?? 'Default') .. '.css'" />
              <script type="text/javascript" src="self:res/syntax2/shCore.js" />
              <script type="text/javascript" eval:src="'self:res/syntax2/shBrush' .. $brush .. '.js'" />
              <script type="text/javascript">SyntaxHighlighter.all();</script>
            </head>
            <body>
              <pre eval:class="'brush: $brush; collapse: $collapse; first-line: $firstline; gutter: $gutter; ruler: $ruler; toolbar: $toolbar; wrap-lines: $wrap; ' % { 
                   brush: string.tolower($brush), 
                   collapse: $collapse ? 'true' : 'false',
                   firstline: $firstline,
                   gutter: $gutter ? 'true' : 'false',
                   ruler: $ruler ? 'true' : 'false',
                   toolbar: $toolbar ? 'true' : 'false',
                   wrap: $wrap ? 'true' : 'false'
              }"><eval:expr value="$code"/></pre>
            </body>
          </html>
        </return>
      </function>
    
      <function transform="pre">
        <name>as3</name>
        <description>Highlight ActionScript3 syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'AS3')</return>
      </function>
    
      <function transform="pre">
        <name>cpp</name>
        <description>Highlight C/C++ syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Cpp')</return>
      </function>
    
      <function transform="pre">
        <name>csharp</name>
        <description>Highlight C# syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'CSharp')</return>
      </function>
    
      <function transform="pre">
        <name>css</name>
        <description>Highlight CSS syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Css')</return>
      </function>
    
      <function transform="pre">
        <name>dekiscript</name>
        <description>Highlight DekiScript syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Dekiscript')</return>
      </function>
    
      <function transform="pre">
        <name>delphi</name>
        <description>Highlight Delphi syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Delphi')</return>
      </function>
    
      <function transform="pre">
        <name>diff</name>
        <description>Highlight Diff syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Diff')</return>
      </function>
    
      <function transform="pre">
        <name>groovy</name>
        <description>Highlight Groovy syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Groovy')</return>
      </function>
    
      <function transform="pre">
        <name>html</name>
        <description>Highlight HTML syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Xml')</return>
      </function>
    
      <function transform="pre">
        <name>java</name>
        <description>Highlight Java syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Java')</return>
      </function>
    
      <function transform="pre">
        <name>javafx</name>
        <description>Highlight JavaFX syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'JavaFX')</return>
      </function>
    
      <function transform="pre">
        <name>javascript</name>
        <description>Highlight JavaScript syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'JScript')</return>
      </function>
    
      <function transform="pre">
        <name>perl</name>
        <description>Highlight Perl syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Perl')</return>
      </function>
    
      <function transform="pre">
        <name>php</name>
        <description>Highlight PHP syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Php')</return>
      </function>
    
      <function transform="pre">
        <name>powershell</name>
        <description>Highlight Powershell syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Powershell')</return>
      </function>
    
      <function transform="pre">
        <name>python</name>
        <description>Highlight Python syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Python')</return>
      </function>
    
      <function transform="pre">
        <name>ruby</name>
        <description>Highlight Ruby syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Ruby')</return>
      </function>
    
      <function transform="pre">
        <name>scala</name>
        <description>Highlight Scala syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Scala')</return>
      </function>
    
      <function transform="pre">
        <name>shell</name>
        <description>Highlight bash/sh/ksh syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Bash')</return>
      </function>
    
      <function transform="pre">
        <name>sql</name>
        <description>Highlight SQL syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Sql')</return>
      </function>
    
      <function transform="pre">
        <name>text</name>
        <description>Show plain text</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Plain')</return>
      </function>
    
      <function transform="pre">
        <name>vb</name>
        <description>Highlight Visual Basic syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Vb')</return>
      </function>
    
      <function transform="pre">
        <name>xml</name>
        <description>Highlight XML syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Xml')</return>
      </function>
    
      <function transform="pre">
        <name>coldfusion</name>
        <description>Highlight ColdFusion syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'ColdFusion')</return>
      </function>
    
      <function transform="pre">
        <name>erlang</name>
        <description>Highlight Erlang syntax</description>
        <param name="code" type="str">source code to highlight</param>
        <param name="collapse" type="bool" default="false">Allows you to force highlighted elements on the page to be collapsed by default.</param>
        <param name="firstline" type="num" default="1">Allows you to change the first (starting) line number.</param>
        <param name="gutter" type="bool" default="true">Allows you to turn gutter with line numbers on and off.</param>
        <param name="ruler" type="bool" default="false">Allows you to show column ruler on top of highlighted elements.</param>
        <param name="toolbar" type="bool" default="true">Toggles toolbar on/off.</param>
        <param name="wrap" type="bool" default="true">Allows you to turn line wrapping feature on and off.</param>
        <param name="theme" type="str" optional="true">Select color theme for highlighted text. (one of 'Default', 'Django', 'Eclipse', 'Emacs', 'FadeToGrey', 'Midnight', or 'RDark'; default: see config)</param>
        <return type="xml">format($code, $collapse, $firstline, $gutter, $ruler, $tooblar, $wrap, $theme, 'Erlang')</return>
      </function>
    </extension>
    

    Was this page helpful?
    Tag page
    Viewing 2 of 2 comments: view all
    Are there any extensions that enable syntax highlighting directly from subversion? For example, rather than cutting & pasting code snippets, one could add a reference to a Subversion URI and artifact to be included in the page. That way, when the subversion file is updated, the wiki page shows the latest version.
    Posted 23:25, 26 Dec 2009
    @nkabir You can invoke the syntax highlighting functions with content obtained using web.text. For example, I used this technique on the following page: http://developer.mindtouch.com/Dream/Classes/MindTouch.Threading.Timer/GlobalClock
    Posted 08:10, 27 Dec 2009
    Viewing 2 of 2 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by