Files
docx-js/docs/usage/comments.md
2022-06-22 23:35:46 +01:00

754 B

Comments

!> Comments requires an understanding of Sections and Paragraphs.

Intro

To add comments in docx, a comments block is specified in the Document. This block defines all the comments in your document. Each comment has an id, which you then reference later.

In the spot you want to add a comment, you simply add a CommentRangeStart and a CommentRangeEnd to specify where the comment starts and ends.

Alternatively, you can use CommentReference to specify a comment at a specific singular point.

Example

Example

Source: https://github.com/dolanmiu/docx/blob/master/demo/73-comments.ts