Child pages
  • Expand Macro
Skip to end of metadata
Go to start of metadata

The Expand macro displays an expandable/collapsible section of text on your page.

What you need to type

What you will get

{expand}This text is hidden until you expand the section.{expand}
 Click here to expand...

This text is hidden until you expand the section.

On this page:

Usage with the Macro Browser

To insert the Expand macro into a page using the Macro Browser,

  1. Open the Confluence page or blog post that you want to edit, then click the 'Edit' button.
  2. Click the Macro Browser icon on the toolbar. The macro browser window will open.
  3. Scroll through the list of macros to find the one you want. Alternatively, start typing the macro name into the search box at the top right of the macro browser. Macros with a matching name will appear in the main pane.
  4. Click the desired macro.
  5. Set the macro parameters to your requirements. If desired, you can preview these changes by clicking 'Refresh'.
  6. Click 'Insert' to add the macro onto the page.

(tick) You can also insert macros via autocomplete. For more information, see Using Autocomplete in the Rich Text Editor.

Usage with the Wiki Markup Editor

Using the default title:

{expand}This text block will expand and collapse.{expand}

With your own title:

{expand:title=Click here to see the text...}This text block will expand and collapse.{expand}


Parameters are options that you can include in Confluence macros to control the content or format of the macro output. The table below lists relevant parameters for this macro.

Parameter names are different in the macro browser and in wiki markup. Below we show the macro browser parameter names in bold text, and the equivalent wiki markup parameters in (bracketed) text. If we do not show any parameter name for the wiki markup, then you should leave out the parameter name and simply include the parameter value as the first parameter, immediately after the colon (:).




Expand Title

Click here to expand...

Defines the text that appears next to the expand/collapse icon.

Prerequisites, Limitations and Other Notes

  • Your administrator must define this user macro. The Expand macro is a user macro that your administrator must define on your Confluence site. You will only be able to use this macro if it has been defined via the Confluence Administration Console. See the administrator's guide to writing the Expand user macro.
  • HTML exports do not show the expanded text. When you export the page to HTML, the text between the macro tags is not visible. Nothing happens when readers click the 'expand' icon. This issue is logged as CONF-21092. If you like, you can vote for the issue or 'watch' it to keep informed of progress.
  • Text is expanded in PDF exports. When you export the page to PDF, the text between the macro tags is expanded so that readers can see it on the PDF page. If this is not working on your Confluence site, please ask your administrator to get the latest version of the macro 'template' from this documentation page: Writing the Expand User Macro.

Writing the Expand User Macro
Working with Macros

Take me back to the Wikis Help Guide.

  • No labels