canvas-editor-plugin icon indicating copy to clipboard operation
canvas-editor-plugin copied to clipboard

Docx | Docx Import Via Mamoth.js

Open jordanparker6 opened this issue 1 year ago • 3 comments

Importing via mamoth.js is going to always have issues as many of the docx styles and blocks are not supported.

See https://github.com/mwilliamson/mammoth.js/

Unfortunately, something more complex is going to be required for this feature to work for production use cases.

Happy to lend a hand if anyone wants to team up on this as having the import feature support the full set of default blocks and marks of thecanvas-editor would be amazing.

jordanparker6 avatar Oct 30 '24 08:10 jordanparker6

For the export, going to pandoc JSON as an intermediately could be a good approach to export to multiple formats

https://discuss.prosemirror.net/t/pandoc-export/6452/2

jordanparker6 avatar Oct 30 '24 08:10 jordanparker6

https://github.com/lalalic/docx4js

https://github.com/zhangyu836/docxjs

This could be better

jordanparker6 avatar Nov 01 '24 09:11 jordanparker6

@jordanparker6
I have used Mammoth.js, but it failed because the DOCX content contains a lot of unusual formatting, which is hard to control. maybe you can provide a plugin of DOCX.

Boxser567 avatar Nov 07 '24 05:11 Boxser567