• Products
  • Documentation
  • Resources

Insert the expand macro

This macro was intentionally removed from the new editor and was replaced with an element available from the Insert menu or from the slash command ( / ) .

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

Using the Expand Macro

To add the Expand macro:

  1. When editing , select from the toolbar

  2. Find the item to be inserted and select it

  3. Select Insert

You can also type / on the page to bring up the same list you'd see by selecting from the toolbar.

To edit the Expand macro

  1. Select the macro placeholder. The floating toolbar appears.

  2. Select Edit. The right panel opens.

  3. Modify the parameters. Your changes are saved as you go.

  4. Resume editing the page, and the panel closes.



Parameters are options that you can set to control the content or format of the macro output. 

If the parameter name used in Confluence Cloud storage format or wikimarkup is different than the label used when inserting macros using the browser or the slash command, it will be listed below in brackets (example).






Click here to expand...

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

Wiki markup example

Wiki markup is useful when you need 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.

1 2 3 4 5 6 {expand:This is my message} This text is _hidden_ until you expand it. {expand}


  • 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, but only if it's done inside a table.


Additional Help