Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,019
Community Members
 
Community Events
184
Community Groups

Ignore whitespace while updating page through API

Edited

I recently switched to Conflunce Cloud and now when I update page through API all whitespaces that exist in storage representation I am sending to Confluence are preserved in the page.

 

Here's an example. I send this page content through API:

 

<p>
word1
word2
word3
</p>
<p>word3<ac:structured-macro ac:name="anchor" ac:schema-version="1"><ac:parameter ac:name="">myanchor</ac:parameter></ac:structured-macro>word4</p>

I expect content inside <p> block to be treated as HTML, so all whitespace formatting should be collapsed. This is the content I expect to see on the page:

word1 word2 word3
word3word4

But all whitespaces are preserved and this is what I get:

Screenshot 2021-12-15 at 10.04.03.png

 

It added spaces before word1, word2, word3 and newlines after them. It also added a space on the place of invisible anchor macro.

This is very tedious to clean up while preparing the page content to send. Is it possible to turn off such strange whitespace behavior? I never had such problem when working with Confluence Server.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events