Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ next-env.d.ts
/content/examples/*/*
/components/example/generated/
sqlite.db

# Auto-generated by Next.js postinstall (agent rules); not repo content.
/AGENTS.md
/CLAUDE.md
4 changes: 0 additions & 4 deletions docs/content/docs/features/blocks/math.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,6 @@ covered; a valid formula using an uncovered command fails the export loudly
(rather than silently exporting something else), while invalid LaTeX renders
the error placeholder as in other formats.

The deprecated [react-pdf exporter](/docs/features/export/pdf#deprecated-the-react-pdf-exporter)'s
mappings remain available from `@blocknote/math-block/pdf-exporter` during its
deprecation window.

### Email

With the [email exporter](/docs/features/export/email), math exports as images with the LaTeX source as the alt text: math blocks are rasterized to PNG in the browser (and embedded as SVG elsewhere), inline math is always embedded as SVG:
Expand Down
7 changes: 4 additions & 3 deletions docs/content/docs/features/export/pdf.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ This works out of the box, fully offline: exports match the editor's look,
and everything needed (the default fonts and the compiler itself) ships
inside the package. Nothing is fetched from a CDN.

See the [full example](/examples/interoperability/converting-blocks-to-pdf-ua)
See the [full example](/examples/interoperability/converting-blocks-to-pdf)
with a live PDF preview below:

<Example name="interoperability/converting-blocks-to-pdf-ua" />
<Example name="interoperability/converting-blocks-to-pdf" />

### Customizing the PDF

Expand Down Expand Up @@ -253,4 +253,5 @@ import {

Note that its mappings are react-pdf mappings; when migrating to the new
exporter, custom blocks need a [Typst mapping](#custom-mappings--custom-schemas)
instead.
instead. The old exporter's example lives on at
[converting-blocks-to-pdf-react-pdf-deprecated](/examples/interoperability/converting-blocks-to-pdf-react-pdf-deprecated).
1 change: 0 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"@polar-sh/sdk": "^0.42.2",
"@react-email/components": "^1.0.4",
"@react-email/render": "^2.0.4",
"@react-pdf/math": "^2.0.1",
"@react-pdf/renderer": "^4.5.1",
"@sentry/nextjs": "^10.34.0",
"@shikijs/core": "^4.4.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
"playground": true,
"docs": true,
"author": "yousefed",
"tags": ["Interoperability"],
"tags": ["Interoperability", "Accessibility"],
"sharedTestDocument": true,
"dependencies": {
"@blocknote/diagram-block": "latest",
"@blocknote/math-block": "latest",
"@blocknote/xl-multi-column": "latest",
"@blocknote/xl-pdf-exporter": "latest",
"@react-pdf/math": "^2.0.1",
"@react-pdf/renderer": "^4.5.1",
"mathjax-full": "^3.2.2"
"@blocknote/xl-multi-column": "latest",
"@blocknote/math-block": "latest",
"@blocknote/diagram-block": "latest",
"@blocknote/xl-typst-compiler": "latest"
},
"pro": true
}
18 changes: 10 additions & 8 deletions examples/05-interoperability/05-converting-blocks-to-pdf/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Exporting documents to PDF (react-pdf, deprecated)
# Exporting documents to PDF (PDF/UA)

> **Deprecated:** this example uses the react-pdf based exporter
> (`@blocknote/xl-pdf-exporter/react-pdf`), which is deprecated and will be
> removed after a few releases. Use the Typst-based `PDFExporter` instead -
> see the "Exporting documents to tagged PDF (PDF/UA)" example - which
> produces accessible, tagged PDF/UA-1 output.
This example exports the current document to an **accessible, tagged PDF/UA-1**
file using the Typst-powered `@blocknote/xl-pdf-exporter`. Unlike a plain PDF,
a tagged PDF carries a logical structure tree (headings, paragraphs, lists,
tables, figures with alt text, links) that screen readers can navigate.

This example exports the current document (all blocks) as a PDF file and downloads it to your computer.
**Try it out:** Edit the document — the PDF preview updates live. Click
"Download" to save it, then verify it with a tool like
[veraPDF](https://verapdf.org/) (`--flavour ua1`) or the Acrobat Tags panel.

**Try it out:** Edit the document and click "Download .pdf" at the top to download the PDF file.
> The first export downloads the Typst compiler (wasm) and fonts, so it may take
> a moment. Images render as tagged placeholder figures for now.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Exporting documents to PDF (react-pdf, deprecated)</title>
<title>Exporting documents to PDF (PDF/UA)</title>
<script>
<!-- AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY -->
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@
"@mantine/hooks": "^9.0.2",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"@blocknote/diagram-block": "latest",
"@blocknote/math-block": "latest",
"@blocknote/xl-multi-column": "latest",
"@blocknote/xl-pdf-exporter": "latest",
"@react-pdf/math": "^2.0.1",
"@react-pdf/renderer": "^4.5.1",
"mathjax-full": "^3.2.2"
"@blocknote/xl-multi-column": "latest",
"@blocknote/math-block": "latest",
"@blocknote/diagram-block": "latest",
"@blocknote/xl-typst-compiler": "latest"
},
"devDependencies": {
"@types/react": "^19.2.3",
Expand Down
Loading
Loading