Files
twenty/packages/twenty-docs/l/zh/twenty-ui/input/block-editor.mdx
T
github-actions[bot] e0d4492013 i18n - docs translations (#17434)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2026-01-26 09:06:17 +01:00

32 lines
837 B
Plaintext

---
title: 区块编辑器
image: /images/user-guide/api/api.png
---
<Frame>
<img src="/images/user-guide/api/api.png" alt="标题" />
</Frame>
使用来自 [BlockNote](https://www.blocknotejs.org/) 的基于区块的富文本编辑器,允许用户编辑和查看内容块。
<Tabs>
<Tab title="**用法**">
```jsx
import { useBlockNote } from "@blocknote/react";
import { BlockEditor } from "@/ui/input/editor/components/BlockEditor";
export const MyComponent = () => {
const BlockNoteEditor = useBlockNote();
return <BlockEditor editor={BlockNoteEditor} />;
};
```
</Tab>
<Tab title="属性">
| 属性 | 类型 | 描述 |
| --- | ----------------- | ---------- |
| 编辑器 | `BlockNoteEditor` | 区块编辑器实例或配置 |
</Tab>
</Tabs>