Preformatted
Add text that respects your spacing and tabs, and also allows styling.
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.
anchor:truebackground:backgroundImage:truebackgroundSize:truegradient:true
color:dimensions:minHeight:trueminWidth:true
shadow:truespacing:padding:truemargin:true
typography:fontSize:truelineHeight:true
interactivity:clientNavigation:true
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
- block.json (reference)
- Source directory — browse the
editandsavesource files,index.php, and more.
这篇文档对你有帮助吗?
谢谢你的反馈!