-
-
Notifications
You must be signed in to change notification settings - Fork 556
Initializing editor with content that has custom blocks results in error #345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I don’t have a definitive solution for the issue you’re encountering, but I’d like to share some insights that might help. In my project, I’ve been using Yjs with IndexedDb to store the editor's content and haven’t encountered the Out of curiosity, are you seeing the |
I think this error is the same that this PR fixes: #336. |
It's not only an sandbox issue - I get in my local env as well. It happens also when the initial content is hardcode instead of read from @todthomson thank you, it looks indeed as a potential duplicate of https://github.com/TypeCellOS/BlockNote/pull/336 |
Ok I found the root cause of the issue, tl;dr the initial content is rendered before the underlying TipTap editor is fully initialized, which doesn't affect default blocks (they don't use any editor functions when rendering) but throws an error for custom blocks. Should be fixed in #348👍 |
Describe the bug
After adding the save and load functionality (https://www.blocknotejs.org/examples/saving-loading) to the Alert Block example (https://www.blocknotejs.org/examples/alert-block)
the editor throws an error on initialization whenever the Alert Block is present in the content.
Same happens with the much simple example of Custom Blocs usage https://www.blocknotejs.org/docs/block-types#custom-block-types
To Reproduce
Misc
The text was updated successfully, but these errors were encountered: