Forums

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

How to format ac:task-list

Schmidt, Cory
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!
January 28, 2025

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

Screenshot 2025-01-28 at 3.47.04 PM.png 

and less like this ... 

Screenshot 2025-01-28 at 3.48.07 PM.png 

Is there some styling I can add without making the page creation reverting to v1 editor? 

1 answer

0 votes
Mia Tamm _Simpleasyty_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 3, 2025

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:

  • Inline text: Try keeping all content inside ac:task-body as plain text without extra block tags like <span>. It should look like this:
<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>
  • User mentions: If you want to mention a user inline (without breaking layout), avoid wrapping them in <span> or styling — just insert the <ri:user> directly inside the body:
<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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events