Loading...
套件使用
安装
BasicBlocksKit
捆绑了段落、标题(H1、H2、H3)、引用块和水平分割线的插件,以及它们对应的 Plate UI 组件。
ParagraphElement
: 渲染段落元素。H1Element
: 渲染 H1 元素。H2Element
: 渲染 H2 元素。H3Element
: 渲染 H3 元素。BlockquoteElement
: 渲染引用块元素。HrElement
: 渲染水平分割线元素。
添加套件
将套件添加到你的插件中:
import { createPlateEditor } from 'platejs/react';
import { BasicBlocksKit } from '@/components/editor/plugins/basic-blocks-kit';
const editor = createPlateEditor({
plugins: [
// ...其他插件,
...BasicBlocksKit,
],
});
手动安装
pnpm add @platejs/basic-nodes
如需单独配置插件,请查看上方链接对应的具体插件文档页面。