# Preformatted text (pre, noformat) in Confluence storage

URL: https://goingstellar.ro/reference/confluence-storage-format/preformatted/

The storage format documentation lists pre for preformatted text. Confluence stores and renders it, but the ADF generated from it is a paragraph with a code mark, so an editor save leaves inline code. The noformat macro is converted to a code macro.

## Storage format

```xml
<pre>preformatted text</pre>
```

## As ADF (Confluence Cloud)

The ADF that Confluence Cloud builds for:

```xml
<ac:structured-macro ac:name="noformat"><ac:plain-text-body><![CDATA[preformatted *no* formatting]]></ac:plain-text-body></ac:structured-macro>
```

```json
{
 "type": "doc",
 "content": [
  {
   "type": "codeBlock",
   "content": [
    {
     "text": "preformatted *no* formatting",
     "type": "text"
    }
   ]
  }
 ],
 "version": 1
}
```

## Examples

Storage format sent:

```xml
<pre>preformatted text</pre>
```

The documented pre element with one line of text. The ADF round trip changes it to a paragraph holding inline code.

Rendered view (HTML):

```html
<pre>preformatted text</pre>
```

Storage format after the round trip through ADF:

```xml
<p><code>preformatted text</code></p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<ac:structured-macro ac:name="noformat"><ac:plain-text-body><![CDATA[preformatted *no* formatting]]></ac:plain-text-body></ac:structured-macro>
```

The noformat macro. It renders in a panel, and an ADF save rewrites it as a code macro, shown highlighted as Java in the view.

Rendered view (HTML):

```html
<div class="preformatted panel conf-macro output-block" data-hasbody="true" data-macro-id="<id>" data-macro-name="noformat" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>preformatted *no* formatting</pre>
</div></div>
```

Storage format after the round trip through ADF:

```xml
<ac:structured-macro ac:name="code" ac:schema-version="1" ac:macro-id="<id>"><ac:plain-text-body><![CDATA[preformatted *no* formatting]]></ac:plain-text-body></ac:structured-macro>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<ac:structured-macro ac:name="noformat"><ac:parameter ac:name="nopanel">true</ac:parameter><ac:plain-text-body><![CDATA[no panel]]></ac:plain-text-body></ac:structured-macro>
```

The noformat macro with the nopanel parameter set to true. The view has no panel, and the parameter is gone after the ADF save.

Rendered view (HTML):

```html
<pre class="conf-macro output-block" data-hasbody="true" data-macro-id="<id>" data-macro-name="noformat">no panel</pre>
```

Storage format after the round trip through ADF:

```xml
<ac:structured-macro ac:name="code" ac:schema-version="1" ac:macro-id="<id>"><ac:plain-text-body><![CDATA[no panel]]></ac:plain-text-body></ac:structured-macro>
```

Sent to Confluence Cloud on 29 Nov 2026.

## What changes in conversion

- pre is stored and rendered as pre, but its ADF form is a paragraph with a code mark. After an ADF save the block element is gone, which was seen with a single line of text only.
- noformat becomes an ADF codeBlock and is written back as a code macro with no language. The view then applies the macro default highlighting, which is Java.
- The nopanel parameter has no ADF equivalent in the probe. The code macro that comes back has no nopanel parameter.

## Where the documentation differs

Sent to Confluence Cloud, 29 Nov 2026:

```xml
<ac:structured-macro ac:name="noformat"><ac:parameter ac:name="nopanel">true</ac:parameter><ac:plain-text-body><![CDATA[no panel]]></ac:plain-text-body></ac:structured-macro>
```

The documentation: The removed-macros page says Noformat macros automatically become native Code snippet elements, and that existing macros migrate without any loss of data.

The actual result: The macro does become a code macro, but the nopanel parameter set to true is dropped. A block that rendered with no panel comes back inside a panel.

## Pitfalls

- Do not use pre for a block that must keep its line breaks and monospace look after an editor save. Use the code macro.
- After conversion the view marks the block with the java brush, because the code macro was created without a language.

## Questions and answers

### Does Confluence Cloud keep a pre element?

Storage keeps it, but an ADF save replaced it with a paragraph holding inline code in the probe.

## Related

- [<code> inline code](https://goingstellar.ro/reference/confluence-storage-format/monospace/)
- [code macro](https://goingstellar.ro/reference/confluence-storage-format/code-macro/)
- [noformat macro](https://goingstellar.ro/reference/confluence-storage-format/noformat/)
- [Macros removed from the Cloud editor](https://goingstellar.ro/reference/confluence-storage-format/legacy-macros/)
- [<blockquote>](https://goingstellar.ro/reference/confluence-storage-format/block-quote/)

## Sources

- [Confluence storage format (Atlassian Documentation)](https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html)
- [Atlassian Document Format: document structure (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)
- [Macros that are unavailable or have limited availability in the Cloud editor (Atlassian Support)](https://support.atlassian.com/confluence-cloud/docs/learn-which-macros-are-being-removed/)

