The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Posting HTML on Confluence using Python

Hung Tu
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!
June 2, 2022

I am on Confluence server and I am trying to post a Dynamic HTML file onto Confluence through python script. I know this HTML works because it shows up when being posted using editor with the default HTML macro.

However, I need to automate this process therefore I am using Python Script. So far I was able to use the Python REST API library to create a page and post simple HTMLs. I got the HTML macro to work as well using this storage format:

"""<ac:structured-macro ac:name="html"><ac:plain-text-body><![CDATA[ {the HTML} ]]></ac:plain-text-body></ac:structured-macro>"""
But when I go to post the this dynamic HTML that has JS and CSS, nothing shows up. When I open the editor of this page, the correct content inside HTML macro is there. This is strange for me and I am not sure where to go from here. Any help is appreciated! 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events