TypeCellOS / BlockNote

A React Rich Text Editor that's block-based (Notion style) and extensible. Built on top of Prosemirror and Tiptap.
https://www.blocknotejs.org/
Mozilla Public License 2.0
6.46k stars 440 forks source link

refactor: decrease coupling with view #909

Closed YousefED closed 2 months ago

YousefED commented 3 months ago

This PR introduces BlockNoteTipTapEditor.dispatch (and shortcut BlockNoteEditor.dispatch) that will apply transactions to the temporary state in case the view hasn't been initialized (mounted) yet.

(BlockNote has the PM more loosely coupled from the editor instantiation than TipTap - to better match React. However, this caused an issue when the user tries to manipulate the document before the view had been instantiated. This PR solves that)

closes #810 closes #833 closes https://github.com/TypeCellOS/BlockNote/issues/633 closes https://github.com/TypeCellOS/BlockNote/issues/439

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ❌ Failed (Inspect) Jul 15, 2024 9:51am
blocknote-website ✅ Ready (Inspect) Visit Preview Jul 15, 2024 9:51am