Below are some sample user macros. To see how to write a user macro and add it to your Confluence site, take a look at our guide to writing user macros

Example 1: A macro that displays 'Hello World'

Take a look at an example of a 'Hello World' macro.

Example 2: The 'Error' macro that creates a red box

Let's write a simple macro that creates a red box (using an existing Confluence style) around some text. See Error Box Macro - Example of a User Macro.

Example 3: A macro that demonstrates the use of parameters

See Colour and Size Macro - Example of a User Macro.

Example 4: A macro that prevents text from being printed

See NoPrint Example of a User Macro.

(warning) The information on this page does not apply to Confluence OnDemand.

Example 5: A macro that creates a preformatted panel

This user macro creates a panel preformatted with specific colours. See Panel Preformatted with Specific Colours - Example of a User Macro.

Example 6: A macro that creates a preformatted table

This user macro creates a table with predefined headings. See Preformatted Table - Example of a User Macro.

Community-contributed user macros

You may want to take a look at the library of shared user macros.
(warning) Be careful when installing user macros from unknown authors.

  • ラベルなし