Skip to content

Conversation

@mattConnHarbour
Copy link
Contributor

  • Calling exportDocx with empty comments array should now export docx without any comments.
  • Previously, was exporting with previous list of comments.
    example:
const newFile = editor.exportDocx({ comments: [], commentsType: 'external'  });

@linear
Copy link

linear bot commented Jan 20, 2026

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84a978b339

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +1009 to 1012
updatedXml = { ...documentXml };
commentsRels = relationships;

this.convertedXml = { ...this.convertedXml, ...updatedXml };

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Drop old comment parts when comments are empty

When commentsWithParaIds is empty, prepareCommentsXmlFilesForExport returns documentXml without comment parts, but the next assignment merges it back with this.convertedXml using a spread. Because spreads don’t delete missing keys, any existing word/comments*.xml entries remain in this.convertedXml, so exportDocx({ comments: [] }) still exports the previous comments (and Editor.ts now includes them when present). To actually remove comments, you’ll need to delete those keys or replace this.convertedXml with documentXml rather than merging.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants