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.

Thanks,

Ann

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.

This widget could not be displayed.

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,

Shannon

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

This widget could not be displayed.

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: 

https://community.atlassian.com/t5/Questions/How-to-create-an-quot-Expand-All-quot-button-for-Confluence/qaq-p/294206

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

601 views 8 6
Join discussion

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