Preformatted

In this article


Add text that respects your spacing and tabs, and also allows styling.

  • Name: core/preformatted
  • Category: text
  • API Version: 3
  • Block Type: Static (saved in post content)

Attributes

Defined via the attributes property in block.json.

Attribute Type Default Description
content rich-text Source: rich-text. Selector: pre. Role: content

Supports

Defined via the supports property in block.json.

Block Markup

This is a static block. The markup is saved directly in the post content.

<!-- wp:core/preformatted -->
<pre class="wp-block-preformatted">Some <em>preformatted</em> text...<br>And more!</pre>
<!-- /wp:core/preformatted -->

Source