Home/Jira formatting reference
Jira text formatting
Header column and header cells in Jira tables
A header cell is any cell written with double bars, so a header column is just || at the start of each body row. The position of header cells is not restricted to the first row.
Wiki markup
||Header||Value||
||Row header|value 1|
Stored as ADF (REST API v3)
The ADF document Jira Cloud stores for ||Header||Value||
||Row header|value 1|
||Row header 2|value 2|:
{
"type": "doc",
"version": 1,
"content": [
{
"type": "table",
"attrs": {
"isNumberColumnEnabled": false,
"layout": "default"
},
"content": [
{
"type": "tableRow",
"content": [
{
"type": "tableHeader",
"attrs": {},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Header",
"marks": [
{
"type": "strong"
}
]
}
]
}
]
},
{
"type": "tableHeader",
"attrs": {},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Value",
"marks": [
{
"type": "strong"
}
]
}
]
}
]
}
]
},
{
"type": "tableRow",
"content": [
{
"type": "tableHeader",
"attrs": {},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Row header",
"marks": [
{
"type": "strong"
}
]
}
]
}
]
},
{
"type": "tableCell",
"attrs": {},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "value 1"
}
]
}
]
}
]
},
{
"type": "tableRow",
"content": [
{
"type": "tableHeader",
"attrs": {},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Row header 2",
"marks": [
{
"type": "strong"
}
]
}
]
}
]
},
{
"type": "tableCell",
"attrs": {},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "value 2"
}
]
}
]
}
]
}
]
}
]
}
Examples
Wiki markup (API v2)
||Header||Value||
||Row header|value 1|
||Row header 2|value 2|Label each row in the first column, for a key-value layout. The first column renders as th cells.
Rendered by Jira (HTML)
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Header</th>
<th class='confluenceTh'>Value</th>
</tr>
<tr>
<th class='confluenceTh'>Row header</th>
<td class='confluenceTd'>value 1</td>
</tr>
<tr>
<th class='confluenceTh'>Row header 2</th>
<td class='confluenceTd'>value 2</td>
</tr>
</tbody></table>
</div>
Back to wiki after the round trip
||*Header*||*Value*||
||*Row header*|value 1|
||*Row header 2*|value 2|Sent to Jira Cloud on .
Wiki markup (API v2)
|a|b|
||c||d||Put the header row below a body row. Jira allows it and does not move it to the top.
Rendered by Jira (HTML)
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'>a</td>
<td class='confluenceTd'>b</td>
</tr>
<tr>
<th class='confluenceTh'>c</th>
<th class='confluenceTh'>d</th>
</tr>
</tbody></table>
</div>
Back to wiki after the round trip
|a|b|
||*c*||*d*||Sent to Jira Cloud on .
Wiki markup (API v2)
||heading 1||heading 2||heading 3||
|col A1|col A2|col A3|
|col B1|col B2|col B3|The standard header row only, for comparison.
Rendered by Jira (HTML)
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>heading 1</th>
<th class='confluenceTh'>heading 2</th>
<th class='confluenceTh'>heading 3</th>
</tr>
<tr>
<td class='confluenceTd'>col A1</td>
<td class='confluenceTd'>col A2</td>
<td class='confluenceTd'>col A3</td>
</tr>
<tr>
<td class='confluenceTd'>col B1</td>
<td class='confluenceTd'>col B2</td>
<td class='confluenceTd'>col B3</td>
</tr>
</tbody></table>
</div>
Back to wiki after the round trip
||*heading 1*||*heading 2*||*heading 3*||
|col A1|col A2|col A3|
|col B1|col B2|col B3|Sent to Jira Cloud on .
What changes in conversion
- A row-header cell becomes a
tableHeadernode with astrongmark on its text, the same as in a header row. - In the wiki read back from ADF, the row-header text is bold:
||*Row header*|value 1|. - ADF also has an
isNumberColumnEnabledattribute (per the documentation, the first column then numbers the rows). That is separate from a header column and has no wiki form.
Pitfalls
||Row header|value 1|uses double bars only before the first cell; the second cell stays a normal cell.- Header text is stored bold, in a header column as in a header row.
Related
- ||header|| and |cell| tables
- Formatting, lists and line breaks in cells
- Merged cells and table options