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.
<p>
and<br/>
elements. – Memphiancode
macro, user formatting has to be preserved. I handle that too with some ugly piece of code, but I can't ignore that it is stupid :-D Also there may appear other situations where formatting needs to be preserved and I will have to add yet more ugly code to handle that. – Apoplexy