Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
927fc59
feat: replace unified.js ecosystem with custom markdown parser/serial…
nperez0111 Apr 3, 2026
218c53a
fix: resolve lint errors in custom markdown parser/serializer
nperez0111 Apr 3, 2026
fb49150
fix: ensure custom markdown serializer works in Node.js/JSDOM environ…
nperez0111 Apr 3, 2026
d629249
fix: suppress no-template-curly-in-string lint warning in test data
nperez0111 Apr 3, 2026
5f33abb
refactor: improve markdown inline parser with tokenizer-array pattern
nperez0111 Apr 11, 2026
9337e50
fix: improve markdown parser robustness and update export snapshots
nperez0111 Apr 11, 2026
88c7013
fix: address PR review feedback for markdown serializer edge cases
nperez0111 Apr 12, 2026
b99de3c
fix: preserve hard breaks as backslash-newline in markdown table cells
nperez0111 Apr 13, 2026
d4ac94b
fix: handle escaped delimiters inside emphasis and fix test imports
nperez0111 Apr 14, 2026
eb1321c
revert: restore @shared alias imports in test executors
nperez0111 Apr 14, 2026
50e8a46
fix(markdown): emit bare URL when link text equals href
nperez0111 Apr 21, 2026
31b9b4d
docs(markdown): clarify minimal parser scope and recommend HTML route
nperez0111 May 6, 2026
4e2fee2
Merge remote-tracking branch 'origin/main' into feat/custom-md-parser
nperez0111 May 6, 2026
f9b9527
test: update link export snapshots after merging origin/main
nperez0111 May 6, 2026
0f746d5
feat(markdown): pass raw HTML through to the parser output
nperez0111 May 6, 2026
0580928
fix(markdown): handle 6 common-pattern parser gaps from CommonMark spec
nperez0111 May 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/content/docs/features/import/markdown.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ imageTitle: Markdown Import

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.

<Callout type={"warning"}>
**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).

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.
</Callout>

## Markdown to Blocks

Use `tryParseMarkdownToBlocks` to try parsing a Markdown string into `Block` objects:
Expand Down
14 changes: 14 additions & 0 deletions docs/content/docs/foundations/supported-formats.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,20 @@ export default function App() {

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

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

### Saving as Markdown

To convert the document to a Markdown string, you can use `editor.blocksToMarkdownLossy()`:
Expand Down
12 changes: 0 additions & 12 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,30 +107,18 @@
"@tiptap/pm": "^3.13.0",
"emoji-mart": "^5.6.0",
"fast-deep-equal": "^3.1.3",
"hast-util-from-dom": "^5.0.1",
"lib0": "^0.2.99",
"prosemirror-highlight": "^0.15.1",
"prosemirror-model": "^1.25.4",
"prosemirror-state": "^1.4.4",
"prosemirror-tables": "^1.8.3",
"prosemirror-transform": "^1.11.0",
"prosemirror-view": "^1.41.4",
"rehype-format": "^5.0.1",
"rehype-parse": "^9.0.1",
"rehype-remark": "^10.0.1",
"rehype-stringify": "^10.0.1",
"remark-gfm": "^4.0.1",
"remark-parse": "^11.0.0",
"remark-rehype": "^11.1.2",
"remark-stringify": "^11.0.0",
"unified": "^11.0.5",
"unist-util-visit": "^5.0.0",
"y-prosemirror": "^1.3.7",
"y-protocols": "^1.0.6",
"yjs": "^13.6.27"
},
"devDependencies": {
"@types/hast": "^3.0.4",
"eslint": "^8.57.1",
"jsdom": "^29.0.2",
"rimraf": "^5.0.10",
Expand Down
Loading
Loading