From 57e25642d182c7d7a2a270cf1639ba629b8ec2f5 Mon Sep 17 00:00:00 2001 From: zbeyens Date: Thu, 24 Oct 2024 04:41:57 +0200 Subject: [PATCH] fix --- .../src/components/plate-editor.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/templates/plate-playground-template/src/components/plate-editor.tsx b/templates/plate-playground-template/src/components/plate-editor.tsx index c566c0c1fd..42451b5644 100644 --- a/templates/plate-playground-template/src/components/plate-editor.tsx +++ b/templates/plate-playground-template/src/components/plate-editor.tsx @@ -33,10 +33,10 @@ import { someNode, } from '@udecode/plate-common'; import { - createPlateEditor, ParagraphPlugin, Plate, PlateLeaf, + usePlateEditor, } from '@udecode/plate-common/react'; import { DndPlugin } from '@udecode/plate-dnd'; import { DocxPlugin } from '@udecode/plate-docx'; @@ -164,7 +164,7 @@ export default function PlateEditor() { } export const useMyEditor = () => { - const editor = createPlateEditor({ + return usePlateEditor({ plugins: [ // Nodes HeadingPlugin, @@ -450,6 +450,4 @@ export const useMyEditor = () => { }, ], }); - - return editor; };