feat: markdown pasting & custom paste handlers
This implements markdown pasting, and custom paste handlers.
Adds
-
editor.pasteTextwhich will paste text content into the editor -
editor.pasteHTMLwhich will convert HTML into BlockNote HTML and then paste that into the editor -
editor.pasteMarkdownwhich will convert the markdown into BlockNote HTML and then paste that into the editor -
editorOptions.pasteHandlerfor allowing the developer the ability to customize how content is pasted into the editor while still allowing the default paste behavior.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| blocknote | 🛑 Canceled (Inspect) | Mar 31, 2025 3:37pm | |
| blocknote-website | ✅ Ready (Inspect) | Visit Preview | Mar 31, 2025 3:37pm |
@nperez0111 didn't review yet; but I just noticed (working on sth unrelated) that actually inline content markdown gets parsed. try pasting xx \*\*hello world\*\*. Did you know this / know where this is done? Tiptap feature?
@nperez0111 didn't review yet; but I just noticed (working on sth unrelated) that actually inline content markdown gets parsed. try pasting
xx \*\*hello world\*\*. Did you know this / know where this is done? Tiptap feature?
https://github.com/ueberdosis/tiptap/blob/dd0a25f5b48867992dd68d3effd5c98ddafcab69/packages/extension-bold/src/bold.tsx#L134-L145
Bold already has a paste rule set up. As well as a number of other Tiptap extensions. What does not work (in blocknote) though would be things across paragraphs or code blocks for example