Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I want to remove a Macro on a page and get content inside it. Can Scriptrunner or

Colin_McDermott
Contributor
February 26, 2025

We have 2x EOL macro's in HTML elements and Include content

We want to get rid of these macro's and we don't want to manually edit each page. 

 

I can see when I view page storage, that HTML elements "shared block" is as the example at the bottom of this comment. 

 

Can I use the confluence scriptrunner Macro editor to pull the content from inside, remove the macro and just paste it on the page? 

i.e. so the macro is removed and only 5.1.0 remains?

 

 

<ac:structured-macro ac:name="shared-block" ac:schema-version="1" ac:macro-id="a2ecad27-4dd6-41cb-a8a8-6ee87bee4091"><ac:parameter ac:name="shared-block-key">release_version</ac:parameter><ac:rich-text-body>
<p>5.1.0</p></ac:rich-text-body></ac:structured-macro>

2 answers

1 vote
Anatolii Starshekov
Contributor
March 6, 2025

@Colin_McDermott , hi, you could try to:

  • Delete the EOL macro
  • Recreate the page using the above storage format 
  • Create a user macro with the same key to meet the required functionality

Your user macro should be bodied (as rich-text suggests from your snippet) and the macro's template should have a user parameter

## @param key:title=Shared Block Key|type=string|required=true

Regards,

Anatolii from Wombats Corp 

0 votes
John Funk
Community Champion
March 5, 2025

Hi Colin,

Since no one has answered yet, I suggest you open a support ticket with Atlassian for guidance. 

https://support.atlassian.com/contact/#/

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.19.30
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events