Skip to content

Commit 31b9b4d

Browse files
nperez0111claude
andcommitted
docs(markdown): clarify minimal parser scope and recommend HTML route
Add callouts to the Markdown import and format-interoperability pages explaining that BlockNote's built-in Markdown parser targets a minimal CommonMark + GFM subset, and that users with broader Markdown needs should parse to HTML themselves and use tryParseHTMLToBlocks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 50e8a46 commit 31b9b4d

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

docs/content/docs/features/import/markdown.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ imageTitle: Markdown Import
1515

1616
BlockNote can import Markdown content into Block objects. Note that this is considered "lossy", as not all Markdown structures can be entirely represented as BlockNote blocks.
1717

18+
<Callout type={"warning"}>
19+
**BlockNote ships a minimal Markdown parser.** It covers the common subset used by most users (CommonMark + GFM basics: headings, paragraphs, lists, task lists, tables, code, blockquotes, links, images, emphasis, strikethrough, hard breaks).
20+
21+
There are many Markdown specifications (CommonMark, GFM, MDX, Pandoc, and various dialect-specific extensions) and supporting all of them inside a rich text editor is not a goal of BlockNote. **If you need to handle Markdown beyond this minimal subset, parse it to HTML yourself with a parser of your choice (e.g. [`marked`](https://github.com/markedjs/marked), [`markdown-it`](https://github.com/markdown-it/markdown-it), or [`remark`](https://github.com/remarkjs/remark)) and pass the resulting HTML to [`tryParseHTMLToBlocks`](/docs/features/import) instead.** BlockNote's HTML interoperability is much broader, since HTML is the format the editor uses internally for arbitrary pastes.
22+
</Callout>
23+
1824
## Markdown to Blocks
1925

2026
Use `tryParseMarkdownToBlocks` to try parsing a Markdown string into `Block` objects:

docs/content/docs/foundations/supported-formats.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,20 @@ export default function App() {
165165

166166
BlockNote also supports converting to and from Markdown. However, converting to and from Markdown is a **lossy** conversion.
167167

168+
<Callout type="warning">
169+
BlockNote ships a **minimal** Markdown parser/serializer that targets the
170+
common CommonMark + GFM subset (headings, paragraphs, lists, task lists,
171+
tables, code, blockquotes, links, images, emphasis, strikethrough, hard
172+
breaks). Supporting every Markdown dialect (CommonMark, GFM, MDX, Pandoc,
173+
and various extensions) is not a goal for the editor. If your use case
174+
requires Markdown features beyond this subset, **parse the Markdown to
175+
HTML yourself** (with a library like [`marked`](https://github.com/markedjs/marked),
176+
[`markdown-it`](https://github.com/markdown-it/markdown-it), or
177+
[`remark`](https://github.com/remarkjs/remark)) and feed the resulting
178+
HTML to `editor.tryParseHTMLToBlocks` — HTML is the format BlockNote uses
179+
for arbitrary pastes and has much broader interoperability.
180+
</Callout>
181+
168182
### Saving as Markdown
169183

170184
To convert the document to a Markdown string, you can use `editor.blocksToMarkdownLossy()`:

0 commit comments

Comments
 (0)