Home/Confluence storage format reference
Confluence storage format
Strikethrough (del, s, span) in Confluence storage format
The storage format documentation writes strikethrough as a span with a line-through style. Storage accepts that span and also the s, del and strike elements. The Cloud editor writes del, and an ADF save keeps only the elements, not the span.
Storage format
<span style="text-decoration: line-through;">strikethrough</span>
<del>del tag</del>
<s>s tag</s>
<strike>strike tag</strike>
In the editor
| How | Note |
|---|---|
| Use the strikethrough option in the toolbar | Per the Atlassian documentation. |
As ADF (Confluence Cloud)
The ADF that Confluence Cloud builds for:
<p><b>b tag</b> <i>i tag</i> <s>s tag</s> <del>del tag</del> <strike>strike tag</strike></p>
{
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"text": "b tag",
"type": "text",
"marks": [
{
"type": "strong"
}
]
},
{
"text": " ",
"type": "text"
},
{
"text": "i tag",
"type": "text",
"marks": [
{
"type": "em"
}
]
},
{
"text": " ",
"type": "text"
},
{
"text": "s tag",
"type": "text",
"marks": [
{
"type": "strike"
}
]
},
{
"text": " ",
"type": "text"
},
{
"text": "del tag",
"type": "text",
"marks": [
{
"type": "strike"
}
]
},
{
"text": " ",
"type": "text"
},
{
"text": "strike tag",
"type": "text",
"marks": [
{
"type": "strike"
}
]
}
]
}
],
"version": 1
}
Examples
Storage format sent
<p><span style="text-decoration: line-through;">strikethrough</span></p>The documented form. It renders with a line through the text, but the ADF read-back has no strike mark.
Rendered view (HTML)
<p><span style="text-decoration: line-through;">strikethrough</span></p>Storage format after the round trip through ADF
<p>strikethrough</p>Sent to Confluence Cloud on .
Storage format sent
<p><b>b tag</b> <i>i tag</i> <s>s tag</s> <del>del tag</del> <strike>strike tag</strike></p>The three element forms side by side. All three become an ADF strike mark and are written back as del.
Rendered view (HTML)
<p><b>b tag</b> <i>i tag</i> <s>s tag</s> <del>del tag</del> <strike>strike tag</strike></p>Storage format after the round trip through ADF
<p><strong>b tag</strong> <em>i tag</em> <del>s tag</del> <del>del tag</del> <del>strike tag</del></p>Sent to Confluence Cloud on .
Storage format sent
ADF:{"content": [{"content": [{"marks": [{"type": "strong"}], "text": "b", "type": "text"}, {"text": " ", "type": "text"}, {"marks": [{"type": "underline"}], "text": "u", "type": "text"}, {"text": " ", "type": "text"}, {"marks": [{"type": "strike"}], "text": "s", "type": "text"}, {"text": " ", "type": "text"}, {"marks": [{"type": "code"}], "text": "c", "type": "text"}, {"text": " ", "type": "text"}, {"marks": [{"attrs": {"type": "sup"}, "type": "subsup"}], "text": "sup", "type": "text"}, {"text": " ", "type": "text"}, {"marks": [{"attrs": {"color": "#ff5630"}, "type": "textColor"}], "text": "red", "type": "text"}, {"text": " ", "type": "text"}, {"marks": [{"attrs": {"color": "#fedec8"}, "type": "backgroundColor"}], "text": "hl", "type": "text"}], "type": "paragraph"}], "type": "doc", "version": 1}A paragraph built in ADF with several marks. The strike mark is written to storage as a del element.
Rendered view (HTML)
<p><style>[data-colorid=ygsqugo5p0]{color:#ff5630} html[data-color-mode=dark] [data-colorid=ygsqugo5p0]{color:#cf2600}</style><strong>b</strong> <u>u</u> <del>s</del> <code>c</code> <sup>sup</sup> <span data-colorid="ygsqugo5p0">red</span> <span style="background-color: rgb(254,222,200);">hl</span></p>Storage format after the round trip through ADF
<p><strong>b</strong> <u>u</u> <del>s</del> <code>c</code> <sup>sup</sup> <span style="color: rgb(255,86,48);">red</span> <span style="background-color: rgb(254,222,200);">hl</span></p>Sent to Confluence Cloud on .
Storage format sent
<ac:structured-macro ac:name="strike"><ac:rich-text-body><p>strike body</p></ac:rich-text-body></ac:structured-macro>The legacy strike macro. It cannot be inserted in the Cloud editor but an existing one survives an ADF save.
Rendered view (HTML)
<span class="strikeMacro conf-macro output-inline" data-hasbody="true" data-macro-id="<id>" data-macro-name="strike" id="">
strike body
</span>Storage format after the round trip through ADF
<ac:structured-macro ac:name="strike" ac:schema-version="1" ac:macro-id="<id>"><ac:rich-text-body><p>strike body</p></ac:rich-text-body></ac:structured-macro>Sent to Confluence Cloud on .
What changes in conversion
- s, del and strike all become one ADF strike mark, and storage then writes del. The distinction between the three tags is lost.
- The span with text-decoration: line-through is stored and rendered as written, but the ADF generated from it contains plain text. After an ADF save the line is gone.
- The strike macro is kept as a macro with its rich text body. The removed-macros page says existing instances stay visible and editable, and the round trip agrees.
Pitfalls
- An ADF save drops a documented span-style strikethrough without any warning. Use del when the text will be saved from the Cloud editor later.
- Searching storage for one of the tags misses the others. Look for del, s, strike and the span form together.
- The strike macro cannot be inserted in the Cloud editor, so new content should not depend on it.
Questions and answers
Which element does the Cloud editor write for strikethrough?
del. s and strike are read as the same mark and written back as del.
Related
- <strong>, <em>, <b> and <i>
- <u> underline
- Macros removed from the Cloud editor
- Storage format vs ADF
- Text highlight