Compare commits

...
Author SHA1 Message Date
Sonarly Claude Code 362bd371fc fix: pass custom BLOCK_SCHEMA to BlockNoteEditor in PDF export
https://sonarly.com/issue/30084?type=bug

Exporting a note or task to PDF fails with "node type mention not found in schema" when the rich text body contains @mentions, because the PDF export creates a BlockNoteEditor with the default schema instead of the custom schema that includes the mention inline content type.
2026-04-22 23:11:07 +00:00
@@ -6,6 +6,8 @@ import {
import { Font, pdf } from '@react-pdf/renderer';
import { saveAs } from 'file-saver';
import { BLOCK_SCHEMA } from '@/blocknote-editor/blocks/Schema';
const registerInterFonts = (() => {
let registrationPromise: Promise<void> | null = null;
@@ -43,6 +45,7 @@ export const exportBlockNoteEditorToPdf = async (
const editor = BlockNoteEditor.create({
initialContent: parsedBody,
schema: BLOCK_SCHEMA,
});
const exporter = new PDFExporter(editor.schema, pdfDefaultSchemaMappings, {