I am trying to publish article on Confluence using REST API.
When I am preparing the article in storage format, I indent the content as if I would HTML code, with newlines and spaces. The problem is that when article gets published all these newlines and spaces are preserved, as if I used <br/>
and non-breaking space symbols.
For example, if I send content like this:
<p>First part of paragraph
<ac:link ac:anchor="4b14531b1624f2b">
<ri:page ri:content-title="Test Article"></ri:page>
<ac:plain-text-link-body><![CDATA[link caption]]></ac:plain-text-link-body>
</ac:link>
last part of paragraph.</p>
It is rendered like this on the page:
First part of paragraph
link caption
last part of paragraph.
But I expect this:
First part of paragraph link caption last part of paragraph.
Is it possible to tell confluence to ignore whitespaces as in normal HTML? Maybe there's some setting admins can change?
If I create the page normally through web editor and then get its content by API call, all returned content is on one line. This is stupid.
I never had this problem with previous Confluence servers I worked on.
I am using Confluence Cloud version.
` and `
– CraZ Dec 17 '21 at 21:47` elements.