Description
Is your feature request related to a problem? Please describe.
When pasting certain text or files, we need to customize the behavior inside the editor. For example, when pasting links to embeddable content, we need to be able to automatically turn those into our custom Embed
component instead of being pasted in as links. Same thing with specific file types being drag and dropped into the editor.
Describe the solution you'd like
A way to specific paste behavior on a per-block-type basis. Provide a callback that has access to the editor instance and that, if returns true, would prevent the default paste behavior.
Describe alternatives you've considered
We're currently using a onPasteCapture
handler in a wrapper component to make this work, but it would be nice if Blocknote supported this out-of-the-box.
Additional context
Add any other context or screenshots about the feature request here.
Bonus
- I'm a sponsor and would appreciate if you could look into this sooner than later 💖