Custom block parse #2439
hackntest
started this conversation in
Questions & Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to understand the
parsecallback ofReactCustomBlockImplementation, because the documentation barely mentions it, and no examples use it. The documentation states that its purpose is to parse HTML into a custom block when pasting from the clipboard, or, in my case, to parse markdown with custom formatting into a custom block. The parsing works, and the block is correctly rendered. However, drag and drop stop working correctly, and when the view is unmounted and remounted (I added a full-screen mode to my editor that displays the view in a modal), it crashes.Also, I noticed that the parse callback is called during drag and drop and receives the dragged Blocknote HTML element, which was unexpected. So I would like to understand better how this parse callback is supposed to be used.
For reference, I'm trying to build a custom block that renders basic sanitized HTML (I'm dealing with editing a legacy GFM markdown + html + custom tags), so for now, I'm trying just to parse divs:
I'm using v0.40.0 with Mantine
Beta Was this translation helpful? Give feedback.
All reactions