Custom Macros
Use this feature to create your own macros.
To see examples of custom macros, check out these pages:
Create a custom macro
- Select Create Custom Macro.
- Fill out the fields that appear:
- Macro Name: Enter a name to identify your macro for you and your users.
- Description: Explain what your macro accomplishes.
- Enabled (radio button): Control wheather your macro can be made available to your users.
- Body Type: Set the body type of the macro.
- Rich Text: The macro allows Rich Text content, which can be formatted, to be inserted.
- Plain Text: The macro allows Plain Text, which is unformatted, to be inserted.
- None: No body.
- Output Type: Choose how the macro appears on the screen.
- Block: The macro will be on its own line on the Confluence page.
- Inline: The macro will be inline with other content on the Confluence page.
- Script to Execute: Enter the script for the macro here.
Note: Different macro editing experiences.The Body Type you select for your custom macro determines how a user can edit the macro when they apply it to a page.
- If you select Rich Text, your user can edit the body of the macro directly on the page.
- If you select Plain Text, your user is directed to macro editor to enter their body of the macro.
- If you select None, your user sees their macro without a body to edit.
- Add any parameters you need for the macro's functionality by clicking Add Parameter. Tip: Implicit parameters
The parameters that are available for use that you don't have to add using this method are:
pageVersionmacroIdspaceKeypageId
Implicit parameters are stored in the same map array as user-defined parameters and can be used in the same way. Avoid giving user-defined parameters the same name as these implicit parameters. You cannot have two items in a map array with the same name.
For each parameter that you add, a modal appears where you fill out the Type, Name, Description, Required, and Hidden fields.
Tip: More parameter informationFor more information on adding macro parameters, visit Macro Parameters.
- Select Save.
The macro now shows up on the main macro screen, where you can see macro information and whether it is enabled.