From 8762a7bc922bf0bb1da97e67d1cb9e8f7e5b1e4b Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Thu, 6 Jun 2024 13:44:09 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(frontend)=20adapt=20BlockNot?= =?UTF-8?q?e=20to=20the=20last=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A recent relase of the BlockNote component has changed the way it is used. This commit adapts the BlockNoteEditor and BlockNoteToolbar components to the new version of the BlockNote. --- .../features/pads/pad-editor/components/BlockNoteEditor.tsx | 3 ++- .../features/pads/pad-editor/components/BlockNoteToolbar.tsx | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/frontend/apps/impress/src/features/pads/pad-editor/components/BlockNoteEditor.tsx b/src/frontend/apps/impress/src/features/pads/pad-editor/components/BlockNoteEditor.tsx index cf67c266..98df3edd 100644 --- a/src/frontend/apps/impress/src/features/pads/pad-editor/components/BlockNoteEditor.tsx +++ b/src/frontend/apps/impress/src/features/pads/pad-editor/components/BlockNoteEditor.tsx @@ -1,6 +1,7 @@ import { BlockNoteEditor as BlockNoteEditorCore } from '@blocknote/core'; +import '@blocknote/core/fonts/inter.css'; import { BlockNoteView } from '@blocknote/mantine'; -import '@blocknote/react/style.css'; +import '@blocknote/mantine/style.css'; import React, { useEffect, useMemo } from 'react'; import { WebrtcProvider } from 'y-webrtc'; diff --git a/src/frontend/apps/impress/src/features/pads/pad-editor/components/BlockNoteToolbar.tsx b/src/frontend/apps/impress/src/features/pads/pad-editor/components/BlockNoteToolbar.tsx index 8c41e8f1..5f20e8e5 100644 --- a/src/frontend/apps/impress/src/features/pads/pad-editor/components/BlockNoteToolbar.tsx +++ b/src/frontend/apps/impress/src/features/pads/pad-editor/components/BlockNoteToolbar.tsx @@ -6,9 +6,7 @@ import { CreateLinkButton, FormattingToolbar, FormattingToolbarController, - ImageCaptionButton, NestBlockButton, - ReplaceImageButton, TextAlignButton, UnnestBlockButton, useBlockNoteEditor, @@ -27,9 +25,6 @@ export const BlockNoteToolbar = () => { {/* Extra button to convert from markdown to json */} - - -