引入新部分并组织内容,以帮助访客(以及搜索引擎)理解内容的结构。
属性
通过 block.json 中的 attributes 属性定义。
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
content | rich-text | — | 来源:rich-text。 选择器:h1,h2,h3,h4,h5,h6。 角色:content |
level | number | 2 | — |
levelOptions | array | — | — |
placeholder | string | — | — |
支持功能
通过 block.json 中的 supports 属性定义。
align:"wide","full"anchor:trueclassName:truesplitting:truebackground:backgroundImage:truebackgroundSize:truegradient:true
color:dimensions:minHeight:trueminWidth:true
shadow:truespacing:margin:truepadding:true
typography:fontSize:truelineHeight:truetextAlign:truetextIndent:truetextShadow:truefitText:true
interactivity:clientNavigation:true
块标记
这是一个 混合块。它保存静态标记,服务器在渲染期间可能会对其进行增强。
<!-- wp:heading {"level":2} -->
<!-- Content... -->
<!-- /wp:heading -->
来源
- block.json (参考)
- 源代码目录 — 浏览
edit和save源文件、index.php等。