From 2472c1451c9e501dfc9dbf8e8ea548b42416957e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Jungmann?= Date: Sat, 31 Aug 2024 13:42:56 +0200 Subject: [PATCH] fix: more fixes --- lib/editor.tsx | 6 +++++- lib/plate-contember.tsx | 10 +++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/editor.tsx b/lib/editor.tsx index 5f5ebe8..8ae64d9 100644 --- a/lib/editor.tsx +++ b/lib/editor.tsx @@ -92,8 +92,12 @@ import { withDraggables } from '@/components/plate-ui/with-draggables' import type { Value } from '@udecode/plate-common' import { Prism } from './components/plate-ui/code-block-combobox' -export const createEditor = (initialValue?: Value, normalizeInitialValue?: boolean) => +export const createEditor = ( + initialValue?: Value, + normalizeInitialValue?: boolean +) => createPlateEditor({ + shouldNormalizeEditor: normalizeInitialValue, plugins: [ BlockquotePlugin, CodeBlockPlugin.configure({ diff --git a/lib/plate-contember.tsx b/lib/plate-contember.tsx index 30d9b16..e52c132 100644 --- a/lib/plate-contember.tsx +++ b/lib/plate-contember.tsx @@ -46,11 +46,11 @@ const PlateEditorForContember = Component( return ( handleEditorOnChange(options.value)} shouldNormalizeEditor additionalToolbarButtons={