How can i get rid of expand macro without it deleting the content in it?

Amanda Tappo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 3, 2024

I have a page in Confluence that heavily uses the expand macro, but now we want to remove these macros while keeping the content intact. The issue is that when I try to copy and paste the content from the expand macro, the process becomes tedious and unreliable. Here's what's happening:

  • Selecting issues: When I try to select a section of content within an expand macro, it often doesn't highlight all of the content I attempt to select. This makes copying partial or full sections difficult.
  • Pasting issues: Even when I manage to partially highlight the content, copying and pasting outside of the macro still includes a macro with the content. I'm unable to paste just the content without the macro.
  • Tedious process: Even if the above issues didn't occur and I were able to copy and paste the content as intended, it would still be incredibly time-consuming to go through every section, copy the content, and delete each expand macro manually.

What I'm looking for is a way to remove all the expand macros from the page while keeping their content intact, ideally in a quicker, more efficient way. Is there a better approach for handling this?

2 answers

0 votes
Barbara Szczesniak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 4, 2024

@Amanda Tappo Welcome to the Atlassian Community.

According to this recent article (https://community.atlassian.com/t5/Confluence-articles/Nest-elements-using-drag-and-drop/ba-p/2848334), you should be able to drag-and-drop the content in the expand to elsewhere on the page. From my own little experiment with an expand that contains a bulleted list, I was able to click the holder next to the first list item and drag the entire list to another spot on the page. You cannot move the text of your expand macro header in this way, but you can copy and paste that (if you want it) or type something else (a heading maybe) in above the text.

If this does not work for you, you could ask your question on that post to get assistance from the author.

0 votes
Lucas Knorr
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 3, 2024

Hi @Amanda Tappo

when you use plugins like Source Editor or get the content of your page via REST API you could remove the tags of the expand macros within your page in bulk. This could safe you some time but requires some technical skill/understanding of the Confluence format.

Suggest an answer

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

Atlassian Community Events