Going Stellar

Home/Confluence storage format reference

Confluence storage format

ac:emoticon and emoji in Confluence storage format

The storage format page lists eleven emoticon names, such as smile, thumbs-up and warning. A page saved from the Cloud editor carries the same element with extra ac:emoji attributes. Unicode emoji typed as text stay plain text.

Storage format

<ac:emoticon ac:name="smile" />
<ac:emoticon ac:name="blue-star" ac:emoji-shortname=":rocket:" ac:emoji-id="1f680" ac:emoji-fallback="🚀" />

As ADF (Confluence Cloud)

The ADF that Confluence Cloud builds for:

<p><ac:emoticon ac:name="smile" /></p>
{
 "type": "doc",
 "content": [
  {
   "type": "paragraph",
   "content": [
    {
     "type": "emoji",
     "attrs": {
      "id": "1f642",
      "text": "🙂",
      "shortName": ":slight_smile:"
     }
    }
   ]
  }
 ],
 "version": 1
}

Examples

Storage format sent

<p><ac:emoticon ac:name="smile" /></p>

The documentation's smile emoticon. After the editor round trip it gains the emoji attributes of the matching emoji.

Rendered view (HTML)

<p><img class="emoticon emoticon-smile" data-emoji-id="1f642" data-emoji-shortname=":slight_smile:" data-emoji-fallback="🙂" src="/wiki/s/-321534267/6452/809f177f9f6ad842ace420edee8427ef8d5fde02/_/images/icons/emoticons/smile.png" width="16" height="16" data-emoticon-name="smile" alt="(smile)" /></p>

Storage format after the round trip through ADF

<p><ac:emoticon ac:name="smile" ac:emoji-shortname=":slight_smile:" ac:emoji-id="1f642" ac:emoji-fallback="🙂" /></p>

Sent to Confluence Cloud on .

Storage format sent

<p><ac:emoticon ac:name="information" /></p>

An Atlassian-specific emoticon with no Unicode character: the id and fallback use atlassian- and shortname text.

Rendered view (HTML)

<p><img class="emoticon emoticon-information" data-emoji-id="atlassian-info" data-emoji-shortname=":info:" data-emoji-fallback=":info:" src="/wiki/s/-321534267/6452/809f177f9f6ad842ace420edee8427ef8d5fde02/_/images/icons/emoticons/information.png" width="16" height="16" data-emoticon-name="information" alt="(info)" /></p>

Storage format after the round trip through ADF

<p><ac:emoticon ac:name="information" ac:emoji-shortname=":info:" ac:emoji-id="atlassian-info" ac:emoji-fallback=":info:" /></p>

Sent to Confluence Cloud on .

Storage format sent

<p><ac:emoticon ac:name="blue-star" ac:emoji-shortname=":rocket:" ac:emoji-id="1f680" ac:emoji-fallback="🚀" /></p>

An emoji that is not on the legacy list, written with the emoji attributes and a placeholder name.

Rendered view (HTML)

<p>🚀</p>

Storage format after the round trip through ADF

<p><ac:emoticon ac:name="rocket" ac:emoji-shortname=":rocket:" ac:emoji-id="1f680" ac:emoji-fallback="🚀" /></p>

Sent to Confluence Cloud on .

Storage format sent

<p><ac:emoticon ac:name="not-a-real-name" /></p>

A name that does not exist, to see what a typo costs.

Rendered view (HTML)

<p><img src="https://your-site.atlassian.net/wiki/plugins/servlet/confluence/placeholder/error?i18nKey=editor.placeholder.error&locale=en_US&version=2" title="The type not-a-real-name is not a known emoticon for the active mapping set." class="transform-error" data-encoded-xml="%3Cac%3Aemoticon+ac%3Aname%3D%22not-a-real-name%22+%2F%3E" /></p>

Storage format after the round trip through ADF

<p><ac:emoticon ac:name="blue-star" ac:emoji-shortname=":blue_star:" ac:emoji-id="atlassian-blue_star" ac:emoji-fallback="not-a-real-name" /></p>

Sent to Confluence Cloud on .

Storage format sent

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

An emoji created from ADF with a shortName and text, and no emoji id.

Rendered view (HTML)

<p><img class="emoticon emoticon-blue-star" data-emoji-id="atlassian-blue_star" data-emoji-shortname=":blue_star:" data-emoji-fallback=":blue_star:" src="/wiki/s/-321534267/6452/809f177f9f6ad842ace420edee8427ef8d5fde02/_/images/icons/emoticons/star_blue.png" width="16" height="16" data-emoticon-name="blue-star" alt="(blue star)" /></p>

Storage format after the round trip through ADF

<p><ac:emoticon ac:name="blue-star" ac:emoji-shortname=":smile:" ac:emoji-fallback="😄" /></p>

Sent to Confluence Cloud on .

Storage format sent

<p>unicode 🚀 emoji</p>

A rocket typed as a Unicode character in paragraph text, with no emoticon element.

Rendered view (HTML)

<p>unicode 🚀 emoji</p>

Storage format after the round trip through ADF

<p>unicode 🚀 emoji</p>

Sent to Confluence Cloud on .

What changes in conversion

  • A bare ac:emoticon with a documented name is accepted. After the ADF round trip it gets ac:emoji-shortname, ac:emoji-id and ac:emoji-fallback (smile becomes :slight_smile: with id 1f642, laugh becomes :grinning:, cheeky becomes :stuck_out_tongue:).
  • information, tick, cross and warning map to atlassian- ids with shortnames :info:, :check_mark:, :cross_mark: and :warning:, and the fallback is the shortname text.
  • An element with ac:name="blue-star" and the rocket attributes is stored as written and displays as the Unicode rocket. After the round trip the name is rewritten to rocket.
  • An unknown name is stored unchanged but renders as a transform error. After the round trip it becomes a blue-star emoticon whose fallback is the wrong name.
  • An ADF emoji is written as ac:name="blue-star" with the shortname and fallback, and renders as the blue star image because it has no emoji id.

Pitfalls

  • Do not guess emoticon names. A wrong ac:name saves without an error and shows a transform error on the page.
  • Emoji sent from ADF without an id show as a blue star, not as the character you sent. Writing the character as plain text avoids this.
  • A Unicode emoji in plain text came back unchanged from the round trip, and it stays a text character instead of an emoticon element.

Questions and answers

How many emoticon names does the documentation list?

Eleven: smile, sad, cheeky, laugh, wink, thumbs-up, thumbs-down, information, tick, cross and warning. All eleven saved and rendered.

Sources

  1. Confluence storage format (Atlassian Documentation)
  2. Atlassian Document Format: document structure (Atlassian Developer)

Markdown version · All storage format pages