Issue: User-added comments were exporting to DOCX with markers but without text content.
Root Cause: SuperDoc's internal convertHtmlToSchema() creates empty paragraph JSON structures without the content array.
Solution: The ExportPreparation class extracts text from commentText HTML and creates proper commentJSON.
Status: ✅ Fixed
Issue: Standalone trackFormat marks (format changes without text changes) were not being exported to DOCX.
Root Cause: SuperDoc's DOCX exporter only generates format change XML (w:rPrChange) when trackFormat co-exists with trackInsert or trackDelete. Standalone trackFormat marks are silently ignored.
We transform standalone trackFormat into delete + insert pairs:
Before: { text: "Chile", marks: [bold, trackFormat] }
After: { text: "Chile", marks: [trackDelete] } // old formatting
{ text: "Chile", marks: [bold, trackInsert] } // new formatting
When rejecting a format change in MS Word, the text becomes empty.
This happens because:
- Word generates
<w:del><w:delText>Chile</w:delText></w:del>+<w:ins><w:t>Chile</w:t></w:ins> - When rejecting: Word removes
<w:ins>but<w:delText>stays as deleted/hidden text - Result: No visible text
Why this can't be fixed easily:
- Word expects format-only changes to use
<w:rPrChange>inside a normal run (notw:ins/w:del) - SuperDoc doesn't support generating this structure for standalone
trackFormat - Implementing proper XML handling is out of scope for this project
Accept works correctly - accepting a format change keeps the new formatting as expected.
Status:
Issue: The export process temporarily modifies the editor content.
Workaround: We save the original state, apply patches, export, then immediately restore. The flicker is minimal and usually imperceptible.
Status: ✅ Acceptable
| Feature | Status | Notes |
|---|---|---|
| Track insertions | ✅ Working | Full support |
| Track deletions | ✅ Working | Full support |
| Track format changes (in editor) | ✅ Working | Full support |
| Track format changes (export) | Accept works, reject empties text | |
| Accept/reject in editor | ✅ Working | Full support |
| User comments (in editor) | ✅ Working | Full support |
| User comments (export) | ✅ Fixed | Via ExportPreparation |
| Download DOCX | ✅ Working | Full support |
The following would require significant changes to SuperDoc's internal DOCX export logic:
- Proper
w:rPrChangeXML generation for standalone format changes - Linked delete/insert pairs that Word recognizes as a single replacement operation
These are documented here for future reference but are not planned for this project.