Back to Twenty

Block Editor

packages/twenty-docs/twenty-ui/input/block-editor.mdx

2.2.0692 B
Original Source
<Frame> </Frame>

Uses a block-based rich text editor from BlockNote to allow users to edit and view blocks of content.

<Tabs> <Tab title="Usage">
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="Props">
PropsTypeDescription
editorBlockNoteEditorThe block editor instance or configuration
</Tab> </Tabs>