Going Stellar

Home/Jira formatting reference

Jira text formatting

Emoji in Jira ADF: shortName, id and text

In ADF an emoji is an inline emoji node with shortName, an optional id and an optional text. Wiki markup has no emoji syntax beyond the emoticon codes, and the new editor inserts them from the : picker (per the Atlassian documentation).

Wiki markup

There is no wiki markup for this element.

Markdown shortcuts in the editor

Per the Atlassian documentation, not tested.

TypeWhat happens
:emoji:Typing a colon, a name and a colon converts to the emoji, per the Atlassian documentation. A bare : opens the emoji picker.

Stored as ADF (REST API v3)

The ADF document Jira Cloud stores for ADF:{"content": [{"content": [{"attrs": {"id": "atlassian-check_mark", "shortName": ":check_mark:", "text": ":check_mark:"}, "type": "emoji"}], "type": "paragraph"}], "type": "doc", "version": 1}:

{
 "type": "doc",
 "version": 1,
 "content": [
  {
   "type": "paragraph",
   "content": [
    {
     "type": "emoji",
     "attrs": {
      "shortName": ":check_mark:",
      "id": "atlassian-check_mark",
      "text": ":check_mark:"
     }
    }
   ]
  }
 ]
}

Examples

ADF (API v3)

{"content": [{"content": [{"attrs": {"id": "atlassian-check_mark", "shortName": ":check_mark:", "text": ":check_mark:"}, "type": "emoji"}], "type": "paragraph"}], "type": "doc", "version": 1}

An Atlassian emoji with its id. v2 draws the check image and returns the wiki code (/).

Rendered by Jira (HTML)

<p><img class="emoticon" src="/images/icons/emoticons/check.png" height="16" width="16" align="absmiddle" alt="" border="0"/></p>

Back to wiki after the round trip

(/)

Sent to Jira Cloud on .

ADF (API v3)

{"content": [{"content": [{"attrs": {"shortName": ":thumbsup:", "text": "👍"}, "type": "emoji"}], "type": "paragraph"}], "type": "doc", "version": 1}

A Unicode emoji with shortName and text but no id. v2 shows the short name as text.

Rendered by Jira (HTML)

<p>:thumbsup:</p>

Back to wiki after the round trip

:thumbsup:

Sent to Jira Cloud on .

ADF (API v3)

{"content": [{"content": [{"attrs": {"shortName": ":smile:", "text": "😄"}, "type": "emoji"}], "type": "paragraph"}], "type": "doc", "version": 1}

The same pattern with :smile:. Without an id the rendering is the short name again.

Rendered by Jira (HTML)

<p>:smile:</p>

Back to wiki after the round trip

:smile:

Sent to Jira Cloud on .

Wiki markup (API v2)

:smile:

Typing the short name in wiki markup. It stays a literal text.

Rendered by Jira (HTML)

<p>:smile:</p>

Back to wiki after the round trip

:smile:

Sent to Jira Cloud on .

What changes in conversion

  • An emoji without an id is not converted by v2: the rendered body and the wiki are the text :smile:.
  • An emoji with an Atlassian id returns as its emoticon code, for example (/), and the HTML shows the emoticon image.
  • In the other direction, wiki emoticons such as (y) or :) are stored as emoji with ids and Unicode text, so the wiki returned from ADF holds the Unicode character.
  • The three kinds in the documentation are standard Unicode, Atlassian (atlassian- id) and site emoji; only the first two were probed.

Pitfalls

  • Writing ADF emoji without an id can show as plain :name: text in tools that use the v2 output.
  • Per the documentation, site emoji are customer defined and have their own id; only Unicode and Atlassian emoji were probed.
  • The wiki text :smile: never becomes an emoji through the API.

Sources

  1. Atlassian Document Format: document structure (Jira Cloud platform)
  2. Markdown and keyboard shortcuts (Atlassian Support, Jira Cloud)
  3. Text Formatting Notation Help (Jira, in-product help)

Markdown version · All formatting pages