-
-
Notifications
You must be signed in to change notification settings - Fork 492
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
Error converting Image Block to Markdown #361
Comments
Thanks for writing up this issue! We still have some work to do on serializing blocks made using Context: |
Thanks for quick and detailed reply. Ease of writing custom components with Blocknote is great, keeping my fingers crossed for custom serialization solution. For now I made a workaround to convert image block to markdown (and store them as paragraph block) before calling |
@matthewlipski @wkocjan Hello! I added PR: #381 that fix the issue. Please check! |
Describe the bug
Newly inserted "Image Block" to the editor causes error when converting to markdown.
Error message:
It happens when
editor.blocksToMarkdown()
is called with empty Image Block.To Reproduce
blocksToMarkdown()
call inonEditorContentChange
:onEditorContentChange
event will fire, causingblocksToMarkdown
to run, which throws an error.Here is the block object with empty image causing the error:
Expected behavior
[alt text](image_url)
) when there is an image.The text was updated successfully, but these errors were encountered: