Supported collaboration features

The Export to Word converter supports Word’s collaboration features, namely the comments and track changes. The comments feature lets you add a notice about a selected part of the content, whereas track changes allow for proposing a change inside the content, like deletion, insertion, or replacement of a selected part of the content.

Both features are also implemented by CKEditor 5, so make sure to read CKEditor 5 comments and CKEditor 5 track changes guides to learn more.

Note that despite that Export to Word requires HTML in a format compatible with CKEditor 5 collaboration features, the converter alone is technology-agnostic. It can be used with custom integrations on your end – as long as it supports the same content format.

# Comments

Comments are an advanced feature of Word that is supported by the Export to Word feature with full compatibility with CKEditor 5 comments. Comments allow users to add notes to the document without changing the content itself.

Comments data is supplied to the converter via the config.collaboration_features.comment_threads configuration option. Comments metadata consists of an array of comment threads, which contain the following properties:

  • thread_id: A string ID of the thread (required).
  • is_resolved: A boolean that determines whether the thread is resolved (defaults to false).
  • comments: An array of comments belonging to the thread. They contain the following properties:
    • content: HTML content of the comment (required).
    • author: A comment author’s name (required).
    • created_at: Date and time describing when the comment was created in ISO 8601 format (optional).

An example of converting HTML content with comments to a Word document:

<p>
    <comment-start name="comment-thread-1"></comment-start>
    Hello world!
    <comment-end name="comment-thread-1"></comment-end>
</p>
{
    "config": {
        "collaboration_features": {
            "comment_threads": [
                {
                    "thread_Id": "comment-thread-1",
                    "resolved": false,
                    "comments": [
                        {
                            {
                                "author": "User 1",
                                "content": "<p>This is an example comment.</p>",
                                "created_at": "2024-05-12T10:00:00.000Z",
                            },
                            {
                                "author": "User 2",
                                "content": "<p>This is another example comment.</p>",
                                "created_at": "2024-05-12T10:30:00.000Z",
                            },
                        }
                    ]
                }
            ]
        }
    }
}

Document with comments

Export to Word converter supports converting paragraphs, inline HTML elements and hyperlinks as content of comments.

# Track changes

Track changes is another advanced feature that is also compatible with the CKEditor 5 track changes. To start tracking changes in Word, select the Review tab from the ribbon and then enable the Track Changes option. Now any changes applied to the document will be tracked.

Track changes data is supplied to the converter via the config.collaboration_features.suggestions. Track changes metadata consist of an array of suggestions with the following properties:

  • id: A string ID of the suggestion (required).
  • author: A suggestion author’s name (required).
  • created_at: Date and time describing when the suggestion was created in ISO 8601 format (optional).

Example of converting HTML content with suggestions to Word document:

<p>
    <suggestion-start name="insertion:0:user1"></suggestion-start>
    Insertion
    <suggestion-end name="insertion:0:user1"></suggestion-end>
</p>

<p>
    <suggestion-start name="deletion:1:user1"></suggestion-start>
    Deletion
    <suggestion-end name="deletion:1:user1"></suggestion-end>
</p>
{
    "config": {
        "collaboration_features": {
            "suggestions": [
                {
                    "id": "0",
                    "author": "User 1",
                    "created_at": "2024-05-12T10:00:00.000Z",
                },
                {
                    "id": "1",
                    "author": "User 1",
                    "created_at": "2024-05-12T10:30:00.000Z",
                }
            ]
        }
    }
}

Document with suggestions

# Timezone

The word track changes feature does not support dates with a specified time zone and all suggestions are treated as local dates and times. You can use the config.timezone option to offset such dates to a specified time zone.

Consider the conversion of the following document:

{
  "html": "<suggestion-start name=\"insertion:s1:user1\"></suggestion-start>Suggestion<suggestion-end name=\"insertion:s1:user1\"></suggestion-end>",
  "config": {
    "collaboration_features": {
      "suggestions": [
        {
          "id": "s1",
          "author": "User 1",
          "created_at": "2020-05-05T14:30:00.000Z"
        }
      ]
    }
  }
}

After opening the generated document in Word, it displays that the suggestion was created on May 5, 2020, at 2:30:00 PM, regardless of the local time zone.

With the time zone set to America/Los_Angeles, the previous suggestion would be displayed in Word as created on May 5, 2020, at 7:30:00 AM, regardless of the local time zone.

The provided time zone must be a valid IANA time zone identifier.