Skip to content

Commit 01c41c2

Browse files
committed
fixup! ✨(frontend) added accessible html export and moved download option
1 parent 2b20239 commit 01c41c2

File tree

1 file changed

+3
-2
lines changed
  • src/frontend/apps/impress/src/features/docs/doc-export/components

1 file changed

+3
-2
lines changed

src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,12 @@ export const ModalExport = ({ onClose, doc }: ModalExportProps) => {
145145

146146
blobExport = await exporter.toODTDocument(exportDocument);
147147
} else if (format === DocDownloadFormat.HTML) {
148-
const editorHtml = await editor.blocksToHTMLLossy();
148+
// Use BlockNote "full HTML" export so that we stay closer to the editor rendering.
149+
const fullHtml = await editor.blocksToFullHTML();
149150

150151
// Parse HTML and fetch media so that we can package a fully offline HTML document in a ZIP.
151152
const domParser = new DOMParser();
152-
const parsedDocument = domParser.parseFromString(editorHtml, 'text/html');
153+
const parsedDocument = domParser.parseFromString(fullHtml, 'text/html');
153154

154155
const mediaFiles: { filename: string; blob: Blob }[] = [];
155156
const mediaElements = Array.from(

0 commit comments

Comments
 (0)