从所有叙事的构建块开始。
属性
通过 block.json 中的 attributes 属性定义。
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
content | rich-text | — | 来源: rich-text。 选择器: p。 角色: content |
dropCap | boolean | false | — |
placeholder | string | — | — |
direction | string | — | 枚举: ltr, rtl |
支持功能
通过 block.json 中的 supports 属性定义。
align:"wide","full"splitting:trueanchor:trueclassName:falseshadow:truecolor:spacing:margin:truepadding:true
typography:fontSize:truelineHeight:truetextAlign:truetextColumns:truetextIndent:truetextShadow:truefitText:true
interactivity:clientNavigation:true
CSS 选择器
通过 block.json 中的 selectors 属性定义。
- root:
p - typography:
- textIndent:
.wp-block-paragraph + .wp-block-paragraph
- textIndent:
块标记
这是一个 混合块。它保存静态标记,服务器在渲染期间可能会对其进行增强。
<!-- wp:paragraph {"dropCap":false} -->
<!-- Content... -->
<!-- /wp:paragraph -->
来源
- block.json (参考)
- 源代码目录 — 浏览
edit和save源文件,index.php等。