Going Stellar

Home/Jira formatting reference

Jira text formatting

Formatting, lists and line breaks inside Jira table cells

Most wiki markup works inside a cell, including inline formatting, links and lists. A forced line break is written \\. Each cell becomes one or more block nodes in ADF.

Wiki markup

|*bold* cell|{{code}} cell|
|[link|https://example.com]|line\\break|
|* item one
* item two|

Stored as ADF (REST API v3)

The ADF document Jira Cloud stores for ||H|| |* item one * item two|:

{
 "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": "H",
           "marks": [
            {
             "type": "strong"
            }
           ]
          }
         ]
        }
       ]
      }
     ]
    },
    {
     "type": "tableRow",
     "content": [
      {
       "type": "tableCell",
       "attrs": {},
       "content": [
        {
         "type": "bulletList",
         "content": [
          {
           "type": "listItem",
           "content": [
            {
             "type": "paragraph",
             "content": [
              {
               "type": "text",
               "text": "item one"
              }
             ]
            }
           ]
          },
          {
           "type": "listItem",
           "content": [
            {
             "type": "paragraph",
             "content": [
              {
               "type": "text",
               "text": "item two"
              }
             ]
            }
           ]
          }
         ]
        }
       ]
      }
     ]
    }
   ]
  }
 ]
}

Examples

Wiki markup (API v2)

||H1||H2||
|*bold* cell|{{code}} cell|
|[link|https://example.com]|line\\break|

Mix bold, monospace, a link and a line break in one table.

Rendered by Jira (HTML)

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>H1</th>
<th class='confluenceTh'>H2</th>
</tr>
<tr>
<td class='confluenceTd'><b>bold</b> cell</td>
<td class='confluenceTd'><tt>code</tt> cell</td>
</tr>
<tr>
<td class='confluenceTd'><a href="https://example.com" class="external-link" rel="nofollow noreferrer">link</a></td>
<td class='confluenceTd'>line<br class="atl-forced-newline" />break</td>
</tr>
</tbody></table>
</div>

Back to wiki after the round trip

||*H1*||*H2*||
|*bold* cell|{{code}} cell|
|[link|https://example.com]|line
break|

Sent to Jira Cloud on .

Wiki markup (API v2)

||H||
|* item one
* item two|

Put a bullet list in a cell, for example a list of affected versions.

Rendered by Jira (HTML)

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>H</th>
</tr>
<tr>
<td class='confluenceTd'><ul>
	<li>item one</li>
	<li>item two</li>
</ul>
</td>
</tr>
</tbody></table>
</div>

Back to wiki after the round trip

||*H*||
|* item one
* item two|

Sent to Jira Cloud on .

Wiki markup (API v2)

||H1||H2||
| | empty first|

Leave a cell empty. The HTML shows a non-breaking space.

Rendered by Jira (HTML)

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>H1</th>
<th class='confluenceTh'>H2</th>
</tr>
<tr>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> empty first</td>
</tr>
</tbody></table>
</div>

Back to wiki after the round trip

||*H1*||*H2*||
| |empty first|

Sent to Jira Cloud on .

Wiki markup (API v2)

||H||
|cell with (y) emoji|

Use an emoticon in a cell. ADF holds it as an emoji node.

Rendered by Jira (HTML)

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>H</th>
</tr>
<tr>
<td class='confluenceTd'>cell with <img class="emoticon" src="/images/icons/emoticons/thumbs_up.png" height="16" width="16" align="absmiddle" alt="" border="0"/> emoji</td>
</tr>
</tbody></table>
</div>

Back to wiki after the round trip

||*H*||
|cell with 👍 emoji|

Sent to Jira Cloud on .

What changes in conversion

  • A \\ line break in a cell is read back from ADF as a real newline inside the cell: line\\break became line, a newline, and break.
  • The list is kept as a bulletList node inside the tableCell and returns as the same two lines.
  • The empty cell becomes a cell with an empty paragraph; in the wiki read back, the space after the bar is gone (| |empty first|).
  • (y) in a cell is stored as an emoji node and comes back as the Unicode thumbs-up character, not as (y).

Pitfalls

  • Each list item inside a cell needs its own line, so the cell continues over several lines before the closing bar.
  • A line break in a cell comes back from ADF as a newline, not as \\, so the wiki text changes.
  • Header cells get bold text added; use normal cells if you want plain text.

Sources

  1. Text Formatting Notation Help (Jira, in-product help)
  2. Atlassian Document Format: document structure (Jira Cloud platform)

Markdown version · All formatting pages