Hey there,
is there any way to make sure the Confluence content gets rendered 100% correctly (including all required scripts and styles) in a Dynamic Content Macro with bodyType "rich-text".
In my Dynamic Content Macro, I try to render Confluence content by using the API /wiki/rest/api/contentbody/convert/{to} (see https://developer.atlassian.com/cloud/confluence/rest/#api-group-Contentbody) to convert the Confluence storage format into HTML. The returned HTML is then rendered in the marco's iFrame.
This basically works but fails for "complex" Confluence elements (such as a Jira issue macro). For those elements, the necessary CSS and/or JavaScript seems to be missing.
I found this page https://ecosystem.atlassian.net/wiki/spaces/CONF/pages/293994679/Rendering+Confluence+content+using+the+content+rest+API but I'm not sure of the information is outdated or not. I have no idea where how to access variable "res" on the client side (for example to resolve "res.webresource.uris.js").
I'm wondering if there is any standard solution for this problem as I expect that all Dynamic Content Macro with bodyType "rich-text" have the same problem.
Thanks in advance!
Meet the engineers who are making the Confluence magic happen at Atlassian ✨
RSVP now!