-
-
Notifications
You must be signed in to change notification settings - Fork 645
Description
Describe the bug
When using FormattingToolbar as a child inside (while also setting formattingToolbar={false}), the editor throws an error on unmount.
It seems CreateLinkButton.ts:76 tries to access editor.prosemirrorView.dom, but the editor view is already unavailable.
Actual error:
error-boundary-callbacks.ts:106 Uncaught Error: [tiptap error]: The editor view is not available. Cannot access view['dom']. The editor may not be mounted yet.
at Object.get (Editor.ts:335:17)
To Reproduce
Use the component like this:
<BlockNoteView
editor={editor}
theme="light"
slashMenu={false}
formattingToolbar={false}
>
<FormattingToolbar />
</BlockNoteView>
On unmount, it triggers the error due to editor.prosemirrorView.dom being undefined.
Expected behavior
Unmounting should not attempt to access editor.prosemirrorView.dom when the editor is already gone.
Misc
Node version: 24.4.1
Package manager: npm 11.4.2
BlockNote version: 0.41.1
Framework: Next.js
Browser: (your browser here)
I'm a sponsor and would appreciate a quicker review 💖