Improve lazy loading (#12186)
WIP, using preview app to test performance (which was very bad)
This commit is contained in:
@ -3,7 +3,7 @@ import {
|
||||
PDFExporter,
|
||||
pdfDefaultSchemaMappings,
|
||||
} from '@blocknote/xl-pdf-exporter';
|
||||
import * as ReactPDF from '@react-pdf/renderer';
|
||||
import { pdf } from '@react-pdf/renderer';
|
||||
import { saveAs } from 'file-saver';
|
||||
|
||||
export const exportBlockNoteEditorToPdf = async (
|
||||
@ -14,6 +14,6 @@ export const exportBlockNoteEditorToPdf = async (
|
||||
|
||||
const pdfDocument = await exporter.toReactPDFDocument(editor.document);
|
||||
|
||||
const blob = await ReactPDF.pdf(pdfDocument).toBlob();
|
||||
const blob = await pdf(pdfDocument).toBlob();
|
||||
saveAs(blob, `${filename}.pdf`);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user