Forums

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

Confluence - AC Code Macro via Java Rest APIs

Vinay Kumar
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!
November 21, 2022

I have been using below snippet via Java Rest API to update a confluence page which renders my text as expected via the <code> block. Since past couple of days, <code> block recognizes the line break as new code block.

"<ac:structured-macro ac:name='code' ac:schema-version='1' ac:macro-id='31e'>"
"<ac:plain-text-body>"
"<code>"+data+</code>"

data field contains below in a .txt format

account-a   region-zxcvb                 2021-03-25 11:22:51
account-b   region-piuyt                 2019-12-05 13:07:34

Previous Rendering in Confluence - Good 

aa.PNG

Since past few days - Bad

 

bb.PNG

Any help is greatly appreciated!!!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events