# Expand sections in Jira: ADF expand and nestedExpand

URL: https://goingstellar.ro/reference/jira-formatting/expand/

The new editor can hide content under a title. In ADF that is an expand node, or a nestedExpand when it sits inside a table cell. Wiki markup has no working macro for it: {expand} typed through REST API v2 is shown as text.

## Wiki markup

```
{expand}...{expand}
```

## Stored as ADF (REST API v3)

The ADF document Jira Cloud stores for `ADF:{"content": [{"attrs": {"title": "Details"}, "content": [{"content": [{"text": "hidden text", "type": "text"}], "type": "paragraph"}], "type": "expand"}], "type": "doc", "version": 1}`:

```json
{
 "type": "doc",
 "version": 1,
 "content": [
  {
   "type": "expand",
   "content": [
    {
     "type": "paragraph",
     "content": [
      {
       "type": "text",
       "text": "hidden text"
      }
     ]
    }
   ],
   "attrs": {
    "title": "Details"
   }
  }
 ]
}
```

## Examples

Wiki markup (API v2):

```
{expand}
hidden
{expand}
```

Tries the macro name through v2. Nothing collapses; the macro text is part of the comment.

Rendered by Jira (HTML):

```html
{expand}<br/>
hidden{expand}
```

Back to wiki after the round trip:

```
{expand}
hidden
{expand}
```

Sent to Jira Cloud on 29 Nov 2026.

ADF (API v3):

```
{"content": [{"attrs": {"title": "Details"}, "content": [{"content": [{"text": "hidden text", "type": "text"}], "type": "paragraph"}], "type": "expand"}], "type": "doc", "version": 1}
```

Sends an expand node through v3. In the v2 view it is no longer collapsible: the title turns into a bold line and the content follows it.

Rendered by Jira (HTML):

```html
<p><b>Details</b></p>

<p>hidden text</p>
```

Back to wiki after the round trip:

```
*Details*

hidden text
```

Sent to Jira Cloud on 29 Nov 2026.

ADF (API v3):

```
{"content": [{"content": [{"content": [{"content": [{"attrs": {"title": "More"}, "content": [{"content": [{"text": "inside", "type": "text"}], "type": "paragraph"}], "type": "nestedExpand"}], "type": "tableCell"}], "type": "tableRow"}], "type": "table"}], "type": "doc", "version": 1}
```

Puts a nestedExpand in a table cell, the only place that node is allowed. The v2 render shows an empty cell and v2 writes the node as raw JSON inside an {adf} block.

Rendered by Jira (HTML):

```html
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'><!-- ADF macro (type = 'nestedExpand') --></td>
</tr>
</tbody></table>
</div>

```

Back to wiki after the round trip:

```
|{adf:display=block}
{"type":"nestedExpand","attrs":{"title":"More"},"content":[{"type":"paragraph","content":[{"type":"text","text":"inside"}]}]}
{adf}|
```

Sent to Jira Cloud on 29 Nov 2026.

## What changes in conversion

- An expand node is read through v2 as a bold paragraph with the title, then the content. The collapsing behaviour is gone from that view.
- If a tool reads wiki and writes it back through v2, a collapsible section loses its structure and is stored as ordinary paragraphs.
- A nestedExpand inside a table cannot be expressed in wiki. v2 writes the whole node as JSON between {adf:display=block} and {adf}, and the html shows only a comment placeholder.

## Pitfalls

- There is no wiki markup that makes a section collapsible on Jira Cloud. Only ADF can do it.
- Expand is a top-level node. Inside a table cell the documentation requires nestedExpand instead.
- Do not read and write comments through v2 if they contain expand sections you want to keep.

## Related

- [{panel} macro](https://goingstellar.ro/reference/jira-formatting/panel/)
- [Macros that do not convert](https://goingstellar.ro/reference/jira-formatting/unsupported-macros/)
- [REST API v2 wiki markup vs v3 ADF](https://goingstellar.ro/reference/jira-formatting/api-v2-vs-v3/)
- [Status lozenge](https://goingstellar.ro/reference/jira-formatting/status/)

## Sources

- [Text Formatting Notation Help (Jira, in-product help)](https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=all)
- [ADF node: expand (Jira Cloud platform)](https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/expand/)
- [ADF node: nestedExpand (Jira Cloud platform)](https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/nestedExpand/)

