I am sending a page create request to Confluence rest api (v2) and have the following ac:task-list with a checkbox and a string value next to it and I am trying to align them properly but it ends up adding an entire line between the checkbox and the value on page creation (all new pages are created with v2 editor which I had set in the space settings).
<ac:task-list>
<ac:task>
<ac:task-id>1</ac:task-id>
<ac:task-status>incomplete</ac:task-status>
<ac:task-body>
<span class="placeholder-inline-tasks"><ac:link>
<ri:user ri:account-id="1234" ri:local-id="5678" />
</ac:link> signs off</span>
</ac:task-body>
</ac:task>
<ac:task>
<ac:task-id>2</ac:task-id>
<ac:task-status>incomplete</ac:task-status>
<ac:task-body>
<span class="placeholder-inline-tasks"><ac:link>
<ri:user ri:account-id="4321" ri:local-id="8765" />
</ac:link> signs off</span>
</ac:task-body>\n
</ac:task>
</ac:task-list>
My question is how do I format it to look more like this
and less like this ...
Is there some styling I can add without making the page creation reverting to v1 editor?
Hi @Schmidt, Cory ,
I totally get what you're aiming for — aligning the checkbox with inline text like @A checks instead of the awkward line break you’re seeing.
The issue is that <ac:task-body> wraps block-level content, so when you insert elements like <span> or <ac:link> with text, they often get pushed to a new line by the editor on render.
A couple of suggestions:
<ac:task>
<ac:task-id>1</ac:task-id>
<ac:task-status>incomplete</ac:task-status>
<ac:task-body>@A checks</ac:task-body>
</ac:task>
<ac:task-body>
<ac:link><ri:user ri:account-id="1234" /></ac:link> signs off
</ac:task-body>
Even then, rendering might still break across lines depending on editor version. Unfortunately, the v2 editor is a bit rigid on how it structures rich content in macros like ac:task.
If layout is critical, another workaround is to use plain bulleted lists (<ul> + emojis or checkboxes) instead of task macros — they give more freedom in inline formatting.
Hope that helps!
— Mia Tamm from Simpleasyty
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.