Home/Confluence storage format reference
Confluence storage format
info, note, tip and warning in Confluence storage format
The info, tip, note and warning macros draw a coloured box around rich text. Each is its own macro name with the same two optional parameters, title and icon. In ADF all four become one panel node, and the macro name is carried only by the panelType attribute.
Storage format
<ac:structured-macro ac:name="info"><ac:rich-text-body><p>Info text</p></ac:rich-text-body></ac:structured-macro>
<ac:structured-macro ac:name="note"><ac:rich-text-body><p>Note</p></ac:rich-text-body></ac:structured-macro>
<ac:structured-macro ac:name="tip"><ac:rich-text-body><p>Tip</p></ac:rich-text-body></ac:structured-macro>
<ac:structured-macro ac:name="warning"><ac:rich-text-body><p>Warning</p></ac:rich-text-body></ac:structured-macro>
<ac:parameter ac:name="title">Heads up</ac:parameter>
<ac:parameter ac:name="icon">false</ac:parameter>
In the editor
| How | Note |
|---|---|
| In the Cloud editor use the panel element to get a similar look and feel | Per the Atlassian documentation. The documentation says the macros still work but suggests the panel element instead. |
| Type / and continue with the macro name to filter the list | Per the Atlassian documentation. |
As ADF (Confluence Cloud)
The ADF that Confluence Cloud builds for:
<ac:structured-macro ac:name="info"><ac:parameter ac:name="title">Heads up</ac:parameter><ac:parameter ac:name="icon">false</ac:parameter><ac:rich-text-body><p>Info with title, no icon</p></ac:rich-text-body></ac:structured-macro>
{
"type": "doc",
"content": [
{
"type": "panel",
"attrs": {
"panelType": "info"
},
"content": [
{
"type": "paragraph",
"content": [
{
"text": "Heads up",
"type": "text",
"marks": [
{
"type": "strong"
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"text": "Info with title, no icon",
"type": "text"
}
]
}
]
}
],
"version": 1
}
Examples
Storage format sent
<ac:structured-macro ac:name="info"><ac:rich-text-body><p>Info text</p></ac:rich-text-body></ac:structured-macro>Highlight a general remark in a box. The body is rich text, so any paragraph markup is allowed.
Rendered view (HTML)
<div class="confluence-information-macro confluence-information-macro-information conf-macro output-block" data-hasbody="true" data-macro-id="<id>" data-macro-name="info"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"> </span><div class="confluence-information-macro-body"><p>Info text</p></div></div>Storage format after the round trip through ADF
<ac:structured-macro ac:name="info" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name="containerLevel">panel_c1</ac:parameter><ac:rich-text-body><p>Info text</p></ac:rich-text-body></ac:structured-macro>Sent to Confluence Cloud on .
Storage format sent
<ac:structured-macro ac:name="info"><ac:parameter ac:name="title">Heads up</ac:parameter><ac:parameter ac:name="icon">false</ac:parameter><ac:rich-text-body><p>Info with title, no icon</p></ac:rich-text-body></ac:structured-macro>Give the box a heading and hide the icon. Both parameters are accepted and drawn as expected on the stored page.
Rendered view (HTML)
<div class="confluence-information-macro has-no-icon confluence-information-macro-information conf-macro output-block" data-hasbody="true" data-macro-id="<id>" data-macro-name="info"><p class="title">Heads up</p><div class="confluence-information-macro-body"><p>Info with title, no icon</p></div></div>Storage format after the round trip through ADF
<ac:structured-macro ac:name="info" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name="containerLevel">panel_c1</ac:parameter><ac:rich-text-body><p><strong>Heads up</strong></p><p>Info with title, no icon</p></ac:rich-text-body></ac:structured-macro>Sent to Confluence Cloud on .
Storage format sent
<ac:structured-macro ac:name="note"><ac:rich-text-body><p>Note</p></ac:rich-text-body></ac:structured-macro>Flag something the reader should not skip. The note macro is the one for things not to skip.
Rendered view (HTML)
<div class="confluence-information-macro confluence-information-macro-note conf-macro output-block" data-hasbody="true" data-macro-id="<id>" data-macro-name="note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"> </span><div class="confluence-information-macro-body"><p>Note</p></div></div>Storage format after the round trip through ADF
<ac:structured-macro ac:name="note" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name="containerLevel">panel_c1</ac:parameter><ac:rich-text-body><p>Note</p></ac:rich-text-body></ac:structured-macro>Sent to Confluence Cloud on .
Storage format sent
<ac:structured-macro ac:name="tip"><ac:rich-text-body><p>Tip</p></ac:rich-text-body></ac:structured-macro>Share a shortcut or best practice in a box.
Rendered view (HTML)
<div class="confluence-information-macro confluence-information-macro-tip conf-macro output-block" data-hasbody="true" data-macro-id="<id>" data-macro-name="tip"><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"> </span><div class="confluence-information-macro-body"><p>Tip</p></div></div>Storage format after the round trip through ADF
<ac:structured-macro ac:name="tip" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name="containerLevel">panel_c1</ac:parameter><ac:rich-text-body><p>Tip</p></ac:rich-text-body></ac:structured-macro>Sent to Confluence Cloud on .
Storage format sent
<ac:structured-macro ac:name="warning"><ac:rich-text-body><p>Warning</p></ac:rich-text-body></ac:structured-macro>Warn about something destructive in a box.
Rendered view (HTML)
<div class="confluence-information-macro confluence-information-macro-warning conf-macro output-block" data-hasbody="true" data-macro-id="<id>" data-macro-name="warning"><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"> </span><div class="confluence-information-macro-body"><p>Warning</p></div></div>Storage format after the round trip through ADF
<ac:structured-macro ac:name="warning" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name="containerLevel">panel_c1</ac:parameter><ac:rich-text-body><p>Warning</p></ac:rich-text-body></ac:structured-macro>Sent to Confluence Cloud on .
Storage format sent
ADF:{"content": [{"attrs": {"panelType": "note"}, "content": [{"content": [{"text": "note panel", "type": "text"}], "type": "paragraph"}], "type": "panel"}], "type": "doc", "version": 1}Send an ADF panel of type note back to storage. This is the purple ADF note, and it has no macro equivalent.
Rendered view (HTML)
<div class="panel conf-macro output-block" data-hasbody="true" data-macro-id="" data-macro-name="panel" style="background-color: #EAE6FF;border-color: #998DD9;border-width: 1px;"><div class="panelContent" style="background-color: #EAE6FF;">
<p>note panel</p>
</div></div>Storage format after the round trip through ADF
<ac:adf-extension><ac:adf-node type="panel"><ac:adf-attribute key="panel-type">note</ac:adf-attribute><ac:adf-attribute key="containerLevel">panel_c1</ac:adf-attribute><ac:adf-content><p>note panel</p></ac:adf-content></ac:adf-node><ac:adf-fallback><div class="panel conf-macro output-block" style="background-color: rgb(234,230,255);border-color: rgb(153,141,217);border-width: 1.0px;"><div class="panelContent" style="background-color: rgb(234,230,255);">
<p>note panel</p>
</div></div></ac:adf-fallback></ac:adf-extension>Sent to Confluence Cloud on .
Storage format sent
<ac:structured-macro ac:name="info"></ac:structured-macro>Save a macro with no body at all. The empty box renders, but it does not survive a trip through ADF.
Rendered view (HTML)
<div class="confluence-information-macro confluence-information-macro-information conf-macro output-block" data-hasbody="false" data-macro-id="<id>" data-macro-name="info"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"> </span><div class="confluence-information-macro-body"> </div></div>Storage format after the round trip through ADF
<p />Sent to Confluence Cloud on .
What changes in conversion
- ADF has one panel node. The mapping read back is info to info, note to warning, tip to success and warning to error, and the macro names return the same way (ADF success becomes tip, ADF error becomes warning).
- Every box saved from ADF carries an extra parameter, containerLevel set to panel_c1, which the input did not have.
- The title parameter is not kept as a parameter. It becomes a bold first paragraph inside the body, and icon=false is dropped, so the icon returns.
- Two ADF types do not map to the matching macro. ADF tip comes back as an info macro and ADF note comes back as an ac:adf-extension node with a purple fallback panel.
- A macro with no body turns into an empty paragraph, so the box disappears.
Where the documentation differs
<ac:structured-macro ac:name="info"><ac:parameter ac:name="title">Heads up</ac:parameter><ac:parameter ac:name="icon">false</ac:parameter><ac:rich-text-body><p>Info with title, no icon</p></ac:rich-text-body></ac:structured-macro>Sent to Confluence Cloud, . The documentation: Under the heading 'Macros that can be inserted in the legacy editor, cannot be inserted in the Cloud editor', the page lists the panel family (info, tip, note, warning, panel) and promises: "No action is required on any existing pages using these macros. They will continue to work on existing pages and migrate from legacy to Cloud editor where applicable, without any loss of data."
The actual result: After one storage to ADF to storage round trip the title parameter and icon=false are gone. Stored back: <ac:structured-macro ac:name="info" ac:schema-version="1" ac:macro-id="<id>"><ac:parameter ac:name="containerLevel">panel_c1</ac:parameter><ac:rich-text-body><p><strong>Heads up</strong></p><p>Info with title, no icon</p></ac:rich-text-body></ac:structured-macro>. The title is now plain bold text and the icon is back.
Pitfalls
- Do not rely on the title or icon parameters on a page that people edit in the Cloud editor. After the first save from the editor the title is body text.
- The names do not line up. The macro warning maps to ADF panelType error, and ADF panelType warning maps to the note macro, so check both sides before converting by hand.
- A box without ac:rich-text-body is lost on conversion, so always include a body, even an empty paragraph.
Questions and answers
Which parameters do the four macros accept?
Two, both optional: title and icon. The icon parameter defaults to true and is turned off with false.
Do these macros still render on Cloud pages?
Yes. All four rendered the expected coloured box on the stored page, and the Atlassian page says existing uses keep working.