# Lists, paragraphs and tables inside table cells

URL: https://goingstellar.ro/reference/confluence-storage-format/content-in-cells/

A td or th can hold block content, not only text: lists, paragraphs, other tables and macros. The round trip keeps the structure and adds a paragraph inside every list item. A collapsible section inside a cell is stored as the expand macro.

## Storage format

```xml
<td><ul><li>item</li></ul><p>text</p></td>
<td><table><tbody><tr><td>inner</td></tr></tbody></table></td>
```

## As ADF (Confluence Cloud)

The ADF that Confluence Cloud builds for:

```xml
ADF:{"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}
```

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

## Examples

Storage format sent:

```xml
<table><tbody><tr><td><ul><li>list in cell</li></ul><p>para</p></td></tr></tbody></table>
```

A bullet list followed by a paragraph in one cell, for a cell that needs a few lines of structure.

Rendered view (HTML):

```html
<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td class="confluenceTd"><ul><li>list in cell</li></ul><p>para</p></td></tr></tbody></table></div>
```

Storage format after the round trip through ADF:

```xml
<table data-layout="default"><tbody><tr><td><ul><li><p>list in cell</p></li></ul><p>para</p></td></tr></tbody></table>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<table><tbody><tr><td><table><tbody><tr><td>nested table</td></tr></tbody></table></td></tr></tbody></table>
```

A table inside a table cell, used for a grid within a grid.

Rendered view (HTML):

```html
<div class="table-wrap"><table class="confluenceTable"><tbody><tr><td class="confluenceTd"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td class="confluenceTd">nested table</td></tr></tbody></table></div></td></tr></tbody></table></div>
```

Storage format after the round trip through ADF:

```xml
<table data-layout="default"><tbody><tr><td><table data-layout="default"><tbody><tr><td><p>nested table</p></td></tr></tbody></table></td></tr></tbody></table>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
ADF:{"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}
```

A collapsible section inside a cell, created from ADF as a nestedExpand node with a title.

Rendered view (HTML):

```html
<div class="table-wrap"><table data-layout="default" class="confluenceTable"><tbody><tr><td class="confluenceTd"><div class="expand-container conf-macro output-block" data-hasbody="true" data-macro-id="<id>" data-macro-name="expand" id="expander-1528453007"><div id="expander-control-1528453007" class="expand-control"><span class="expand-control-icon icon"> </span><span class="expand-control-text">More</span></div><div id="expander-content-1528453007" class="expand-content expand-hidden"><p>inside</p></div></div></td></tr></tbody></table></div>
```

Storage format after the round trip through ADF:

```xml
<table data-layout="default"><tbody><tr><td><ac:structured-macro ac:name="expand" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name="title">More</ac:parameter><ac:rich-text-body><p>inside</p></ac:rich-text-body></ac:structured-macro></td></tr></tbody></table>
```

Sent to Confluence Cloud on 29 Nov 2026.

## What changes in conversion

- A list and a paragraph in one cell both come back, in the same order. Each li gains a p element around its text.
- A nested table is kept inside the cell and the inner table also gets data-layout="default".
- An ADF nestedExpand in a table cell is written as the expand macro, with its title as a title parameter and the body in ac:rich-text-body, and renders as a collapsed expand control.

## Pitfalls

- The expand inside a cell is a nestedExpand node in ADF, but the stored form is an ordinary expand macro, so storage alone does not show it came from a cell.
- Cell text written without a p comes back inside a p after the editor saves the page, and list items get the same treatment.
- Only one level of nesting was probed for tables and for the expand. Deeper structures were not run.

## Related

- [Tables](https://goingstellar.ro/reference/confluence-storage-format/tables/)
- [Merged cells](https://goingstellar.ro/reference/confluence-storage-format/merged-cells/)
- [expand macro](https://goingstellar.ro/reference/confluence-storage-format/expand/)
- [Nested and mixed lists](https://goingstellar.ro/reference/confluence-storage-format/nested-lists/)
- [details and detailssummary (page properties)](https://goingstellar.ro/reference/confluence-storage-format/page-properties/)

## 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/)

