# Placeholders and template variables in storage format

URL: https://goingstellar.ro/reference/confluence-storage-format/placeholders-variables/

Templates use ac:placeholder for instruction text that disappears when someone types, and at:var for named variables declared with at:declarations. A placeholder round trips and renders as an empty paragraph. A variable written in a regular page is kept in storage but removed by the ADF round trip.

## Storage format

```xml
<p><ac:placeholder>Type the summary here</ac:placeholder></p>
<ac:placeholder ac:type="mention">@mention example</ac:placeholder>
<p>Name: <at:var at:name="MyText" /></p>
```

## As ADF (Confluence Cloud)

The ADF that Confluence Cloud builds for:

```xml
<p><ac:placeholder>Type the summary here</ac:placeholder></p>
```

```json
{
 "type": "doc",
 "content": [
  {
   "type": "paragraph",
   "content": [
    {
     "type": "placeholder",
     "attrs": {
      "text": "Type the summary here"
     }
    }
   ]
  }
 ],
 "version": 1
}
```

## Examples

Storage format sent:

```xml
<p><ac:placeholder>Type the summary here</ac:placeholder></p>
```

Instruction text for a page created from a template, shown to the author until they type over it.

Rendered view (HTML):

```html
<p></p>
```

Storage format after the round trip through ADF:

```xml
<p><ac:placeholder>Type the summary here</ac:placeholder></p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<p>A single-line text variable:&nbsp;<at:var at:name="MyText" /></p>
```

The single-line variable from the template section of the storage format page, written in an ordinary page, not a template.

Rendered view (HTML):

```html
<p>A single-line text variable: <at:var at:name="MyText" /></p>
```

Storage format after the round trip through ADF:

```xml
<p>A single-line text variable:&nbsp;</p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<ac:task-list><ac:task><ac:task-status>incomplete</ac:task-status><ac:task-body>Call back <time datetime="2026-12-15" /></ac:task-body></ac:task></ac:task-list>
```

A task body after the editor round trip, which wraps its text in a span whose class is placeholder-inline-tasks. It looks like a placeholder, but it is not an ac:placeholder.

Rendered view (HTML):

```html
<ul class="inline-task-list" data-inline-tasks-content-id="<page id>"><li data-inline-task-id="">Call back <time datetime="2026-12-15" class="date-future">15 Dec 2026</time></li></ul>
```

Storage format after the round trip through ADF:

```xml
<ac:task-list>
<ac:task>
<ac:task-id>3</ac:task-id>
<ac:task-uuid><id></ac:task-uuid>
<ac:task-status>incomplete</ac:task-status>
<ac:task-body><span class="placeholder-inline-tasks">Call back <time datetime="2026-12-15" /></span></ac:task-body>
</ac:task>
</ac:task-list>
```

Sent to Confluence Cloud on 29 Nov 2026.

## What changes in conversion

- ac:placeholder is kept in storage and ADF holds it as a placeholder node with the same text. The rendered page shows an empty paragraph.
- at:var is stored as written and the view prints the element literally. It is removed in ADF, and the saved storage keeps only the text around it, so A single-line text variable: remains and the variable is gone.
- The at:declarations block and the ac:type="mention" placeholder from the documentation were not sent, so their conversion is not covered.

## Pitfalls

- Template variables only make sense in a template. In a normal page at:var is shown as raw text and is deleted by the editor.
- Placeholder text is invisible in the rendered page. Do not put information in it that readers need.
- The class name placeholder-inline-tasks belongs to tasks, not to template placeholders. Searching for placeholder in storage returns both.

## Related

- [<ac:task-list> task lists](https://goingstellar.ro/reference/confluence-storage-format/task-lists/)
- [<time> dates](https://goingstellar.ro/reference/confluence-storage-format/dates/)
- [User links and mentions](https://goingstellar.ro/reference/confluence-storage-format/user-links-mentions/)
- [Storage format vs ADF](https://goingstellar.ro/reference/confluence-storage-format/storage-vs-adf/)

## Sources

- [Confluence storage format (Atlassian Documentation)](https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html)
- [Atlassian Document Format: document structure (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)

