Open
Description
Describe the bug
Importing ReactEmailExporter from @blocknote/xl-email-exporter throws
“TypeError: Cannot read properties of undefined (reading ‘ReactCurrentDispatcher’)” under React 19
To Reproduce
import { describe, expect, test } from "vitest";
import { BlockNoteEditor, BlockNoteSchema } from "@blocknote/core";
import {
reactEmailDefaultSchemaMappings,
ReactEmailExporter,
} from "@blocknote/xl-email-exporter";
describe("toReactEmailDocument", () => {
test("should export a simple paragraph", async () => {
const editor = BlockNoteEditor.create({
initialContent: [
{
type: "paragraph",
content: "Hello, world!",
},
],
});
const exporter = new ReactEmailExporter(
BlockNoteSchema.create(),
// @ts-ignore
reactEmailDefaultSchemaMappings,
);
const html = await exporter.toReactEmailDocument(editor.document as any);
expect(html).toContain("Hello, world!");
});
});
running this vitest file with React 19 and blocknote version 0.32.0
Misc
- Node version: v24.2.0
- Package manager: pnpm
- React 19
- Blocknote version: 0.32.0