Can I toggle expand all Expand Macros in a page? Edited

I have multiple Expand macros in a page that collects weekly meeting notes in a table. I use the Expand macros because the comments column can get very long and it creates a really long page. In order to reduce the long page, I can collapse the comments and it shrinks the rows. 

However, I cannot do CRTL+F to find text within a collapsed section. Is there a way to expand and collapse all the Expand macros on a page in one click?

This would really improve my workflow. Also open to other creative suggestions.

I could imagine a button on top of the page called "Expand all" / "Collapse all"

3 answers

2 accepted

@Shannon Spaniol - Can you confirm Tim's workaround is legit before I try it? Thanks!

Ann Worley Atlassian Team Mar 27, 2018

Hi Ray,

Just barging in because Shannon is not around. I tried Tim's workaround and it worked for me in Confluence 6.8 and on Confluence Cloud.



Thank you @Timothy Cameron!!
Works great :)

For those who can't read Medium at work, make a bookmarklet with this URL 

javascript:(function()%7B%24(".expand-control").each(function()%7B %24(this).trigger("click")%3B%7D)%7D)()

 but replace : with a colon.

1 vote
Answer accepted

Hi Ray,

Since this is not yet a feature, I went ahead and created the request for you:

Perhaps other users that happen upon your question will have other suggestions, but please feel free to vote and comment on that issue above with your usage case.

Kind regards,


Thanks Shannon, I'll follow this new request and hope for an update soon.

There's also another fix that doesn't rely on users having to add a button in the browser, instead the page author can add code on the page that will do it. I tested on a page in Server version 6.2.3 and it works. I'll also get our admin to create a custom macro so it will be available to all our users. It's in this community thread in the post from Ben Coughlan Nov 16, 2015 about inserting an HTML macro and using the code Ben provided:

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,505 views 4 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you