How can I create a User Macro that functions similarly to the Confluence's "Include Excerpt" Macro?

Troy S
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!
January 16, 2025

I am attempting to create a user macro that generally mimics Confluence's "include Excerpt" macro. I am having trouble actually parsing the content to only extract the content within the Excerpt macro. What I've learned: fetching the body.view content allows me to get all the required content (i.e. images, macros, etc.) and body.storage allows me to understand where the content in the macro ends. I've also tried using the rest api to get the content of the macro, but this only returns the storage format of the macro body. Is there any insight into how the confluence Include Excerpt macro works to make this a bit simpler for me? For additional context - the functionality that I am looking to add to the base Include Excerpt macro is: 1) allow content to be able to pull from specific versions of the page 2) allow multiple instances of the macro on one page. These two pieces are not the issue however, I can get almost all of this functioning, I am just missing the piece of selecting the Excerpt content. Thank you!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events