添加自定义 HTML 代码并在编辑时预览它。

  • 名称: core/html
  • 类别: widgets
  • API 版本: 3
  • 块类型: Static(保存在帖子内容中)
  • 关键词: embed

属性

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

属性类型默认值描述
contentstring—角色:local

支持

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

块标记

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

<!-- wp:core/html -->
<h1>Some HTML code</h1>
<div>This is a div</div>
<!-- /wp:core/html -->

来源