Paste Code Macro
Last modified by Frank Fock on 2024/05/23 17:17
Description
The Code Paste macro is a bridge between Confluence and XWiki's Code macro. The aim of this macro is to allow users to paste code snippets in the page.
Parameters
Parameter | Description |
---|---|
language | The code language to be used for the representation. |
title | The title of the box containing the code. |
Example of usage
{{paste-code-macro language="java" title="Hello World Example"}}
class Simple{
public static void main(String args[]){
System.out.println("Hello World !");
}
}
{{/paste-code-macro}}
class Simple{
public static void main(String args[]){
System.out.println("Hello World !");
}
}
{{/paste-code-macro}}
With the following result :
Hello World Example
class Simple{
public static void main(String args[]){
System.out.println("Hello Java");
}
}
public static void main(String args[]){
System.out.println("Hello Java");
}
}