添加尊重您的空格和制表符的文本,同时也允许进行样式设置。

  • 名称: core/preformatted
  • 类别: 文本
  • API 版本: 3
  • 块类型: 静态(保存在帖子内容中)

属性

通过 attributes 属性在 block.json 中定义。

属性类型默认值描述
contentrich-text—来源:rich-text。 选择器:pre。 角色:content

支持

通过 supports 属性在 block.json 中定义。

块标记

这是一个 静态块。标记直接保存在帖子内容中。

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

来源