Expand Macro
The Expand macro displays an expandable/collapsible section of text on your page.
Here is an example:
Using the Expand Macro
To insert the Expand macro into a page using the macro browser:
- From the editor toolbar, choose Insert > Other Macros
- Find and select the required macro
Speed it up with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. In this example we're inserting the cheese macro.
To edit an existing macro: Click the macro placeholder and choose Edit. This will open the macro details, so you can edit the macro parameters.
Parameters
Parameters are options that you can set to control the content or format of the macro output. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example
).
Parameter | Default | Description |
---|---|---|
Title | Click here to expand... | Defines the text that appears next to the expand/collapse icon. |
Wiki markup example
This example is useful when you want to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.
Macro name: expand
Macro body: Accepts rich text.
{expand:This is my message}
This text is _hidden_ until you expand it.
{expand}
Notes
- Text is expanded in PDF and HTML exports. When you export the page to PDF or HTML, the text between the macro tags is expanded so that readers can see it in the PDF and HTML versions of the page.
- Nesting your Expand macros. You can put one Expand macro inside another, and Confluence will correctly show and hide the contents of all Expand macros, including the nested ones.
Do more with Confluence
Extend Confluence with one of the hundreds of other macros in the Atlassian Marketplace, such as:
- Composition Tabs & Page Layouts: Toggle or expand the visible of portions of your pages with the Toggle and Cloak macro
- Content Formatting for Confluence: Over 30 easy-to-use Confluence macros gives you the ability to create better, more engaging content