What happened?
When importing a docx made in Word that does not contain a numbered list, then adding the first numbered list in the super-editor, and exporting the docx, the docx cannot be opened in Word and cannot be repaired. The docx renders fine in super editor. This has to do with how super editor is creating that numbered list without the w16cid namespace for w:numbering.
Steps to reproduce
- Create a blank Word document
- Import it into Super Editor
- Add a numbered list
- Export to DOCX
- Open in Word - Fails to Open
SuperDoc version
1.43.1
Browser
Chrome
Additional context
This happens because the XML namespace for w:numbering does not contain the w16cid and w16cex namespaces in the <w:numbering> declaration, but uses at least w16cid:durableId.
Adding those namespaces to the NUMBERING_ROOT_ATTRS in packages/super-editor/src/editors/v1/core/parts/adapters/numbering-part-descriptor.ts makes things export properly.
'xmlns:w16cid': 'http://schemas.microsoft.com/office/word/2016/wordml/cid',
'xmlns:w16cex': 'http://schemas.microsoft.com/office/word/2018/wordml/cex',
What happened?
When importing a docx made in Word that does not contain a numbered list, then adding the first numbered list in the super-editor, and exporting the docx, the docx cannot be opened in Word and cannot be repaired. The docx renders fine in super editor. This has to do with how super editor is creating that numbered list without the
w16cidnamespace forw:numbering.Steps to reproduce
SuperDoc version
1.43.1
Browser
Chrome
Additional context
This happens because the XML namespace for
w:numberingdoes not contain thew16cidandw16cexnamespaces in the<w:numbering>declaration, but uses at leastw16cid:durableId.Adding those namespaces to the
NUMBERING_ROOT_ATTRSinpackages/super-editor/src/editors/v1/core/parts/adapters/numbering-part-descriptor.tsmakes things export properly.