Paste Code Macro

Zuletzt geändert von xwikiadmin am 2023/10/26 09:38

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

ParameterDescription
languageThe code language to be used for the representation.
titleThe 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}}

With the following result :

Hello World Example

class Simple{
   public static void main(String args[]){
        System.out.println("Hello Java");
   }
}