curvenote / prosemirror-docx

Export a prosemirror document to a Microsoft Word file, using docx.
MIT License
97 stars 13 forks source link

No more compatible with docx since v8.5.0 #21

Closed jlchereau closed 3 weeks ago

jlchereau commented 3 months ago

This now fails (used to work fine with versions 8.4.0 and prior):

import { defaultDocxSerializer } from 'prosemirror-docx';
import { Packer } from 'docx';
import { saveAs } from 'file-saver';

const input = proseMirrorElement.current.value();
const wordDocument = defaultDocxSerializer.serialize(input, {});
const blob = await Packer.toBlob(wordDocument);
saveAs(blob, 'whatever.docx');

Issue seems to be related to missing FontTable after https://github.com/dolanmiu/docx/pull/2174

dan-cooke commented 1 month ago

Checkout our fork https://github.com/templi-ai/prosemirror-docx - we have bumped docx to version 8.5.0

jlchereau commented 3 weeks ago

Fixed with https://github.com/curvenote/prosemirror-docx/releases/tag/v0.2.0. Thx.