CodeMacro
This is a Radeox macro, bundled with all the XWiki products by default.
Macro developed by the XWiki Development Team.
This macro cannot currently be downloaded separately.
Macro developed by the XWiki Development Team.
This macro cannot currently be downloaded separately.
Code Macro
Displays code located between {code} elements with a special formatting. XWiki's code macro inherits from Radeox's code macro and has the same features. It knows how to display Java code, XMLUsage
{code[:none|:java|:xml|:sql]}Parameters definition
- none: no formatting
- java: forces the pretty printer to use the Java coloring scheme. This is the default.
- xml: forces the pretty printer to use the XML coloring scheme.
- sql: force the pretty printer to use the SQL coloring scheme.
Example
\{code\}
public class MyClass {
public void helloWorld() {}
}
\{code\}
\{code:xml\}
<hello>
<world>Cool!</world>
</hello>
\{code\}
\{code:sql\}
SELECT * FROM TABLE;
\{code\}Result
public class MyClass { public void helloWorld() {} }
<hello> <world>Cool!</world> </hello>
SELECT * FROM TABLE;