♻️(frontend) adapt BlockNote to the last version

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.
This commit is contained in:
Anthony LC
2024-06-06 13:44:09 +02:00
committed by Anthony LC
parent 589b0eab32
commit 8762a7bc92
2 changed files with 2 additions and 6 deletions

View File

@@ -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';

View File

@@ -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 */}
<MarkdownButton key="customButton" />
<ImageCaptionButton key="imageCaptionButton" />
<ReplaceImageButton key="replaceImageButton" />
<BasicTextStyleButton basicTextStyle="bold" key="boldStyleButton" />
<BasicTextStyleButton
basicTextStyle="italic"