Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,003
Community Members
 
Community Events
176
Community Groups

Ability to expand all dropdowns within a confluence article

I've seen this posted on other forums, but I'm running into the following issue with the expand macro.

We use the expand macro to create drop downs in the SOPs, but it prevents our users from command + f on their macs or ctrl + f on their chrome books if the answer is within a drop down. 

I'm looking for a way to expand / collapse all dropdowns with one click of a button instead of having to select each one individually. 

Before there was a javascript recommendation within a bookmark, but it doesn't work: javascript:(function()%7B%24(%22.expand-control%22).each(function()%7B%20%24(this).trigger(%22click%22)%3B%7D)%7D)()

2 answers

For anyone else like me stuck with these frustrating collapsed sections: the JS that works with the new markup is: document.querySelectorAll("[data-node-type='expand'][data-expanded='false']").forEach(e=>e.querySelector("button").click())

So the bookmarklet you want is (replace : with a real colon when you create the bookmark): 

javascript:(function()%7Bdocument.querySelectorAll(%22%5Bdata-node-type%3D'expand'%5D%5Bdata-expanded%3D'false'%5D%22).forEach(e%3D%3Ee.querySelector(%22button%22).click())%7D)()

 

0 votes
Diego Atlassian Team Sep 10, 2020

Hello @Jacob Schwartz !

As I understand, you need to be able to expand all Expand Macros within your pages. What I can tell you is that this is not natively available for Confluence Cloud.

We have a standing Suggestion that tackles this very need. You can check the suggestion here:

I was also unable to find third-party addons that would provide such functionality.

I understand that this is not a final solution, but I believe it explains the current situation of this feature.

Thanks for the update here. I see that the last comment is in June, do you have any idea on when this is targeted to rollout?

Diego Atlassian Team Sep 11, 2020

Thanks for getting back to me @Jacob Schwartz !

Currently, I do not have a rollout schedule for this feature.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS

Atlassian Community Events