From 4a9115f8d7b670e81d51464061c8bffa4a2fb759 Mon Sep 17 00:00:00 2001 From: suriyaprakasamr Date: Fri, 4 Sep 2026 16:35:28 +0530 Subject: [PATCH 1/2] Document highlighting comments by author feature Added section on highlighting comments by author in DOCX Editor. --- .../Word-Processor/javascript-es6/comments.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Document-Processing/Word/Word-Processor/javascript-es6/comments.md b/Document-Processing/Word/Word-Processor/javascript-es6/comments.md index 480bb7f583..b76562a1b7 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es6/comments.md +++ b/Document-Processing/Word/Word-Processor/javascript-es6/comments.md @@ -177,6 +177,26 @@ container.appendTo('#container'); > The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the DOCX Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property. +## Highlight comments by author + +When `highlightCommentsByAuthor' is enabled, each comment marker and pane border is displayed in the author’s avatar color. +Selecting a comment highlights the corresponding text in that color. If multiple comments appear on the same line, the marker retains the first author’s avatar color. + +The following example illustrates how to enable comment highlights in the DOCX Editor + +```ts +var container = new ej.documenteditor.DocumentEditorContainer({ + enableToolbar: true, + height: '590px', + // Enable mention support in document editor + documentEditorSettings: { highlightCommentsByAuthor : true } +}); + +ej.documenteditor.DocumentEditorContainer.Inject(ej.documenteditor.Toolbar); +container.serviceUrl = 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/'; +container.appendTo('#container'); +``` + ## Events The DOCX Editor provides [beforeCommentAction](https://ej2.syncfusion.com/documentation/api/document-editor-container#beforecommentaction) event, which is triggered on comment actions like post, edit, reply, resolve, and reopen. This event provides an opportunity to perform custom logic on comment actions like post, edit, reply, resolve, and reopen. The event handler receives the [CommentActionEventArgs](https://ej2.syncfusion.com/documentation/api/document-editor/commentActionEventArgs) object as an argument, which allows access to information about the comment. From 938ac2339f37a53fcded8e62bc3fb6212f47e457 Mon Sep 17 00:00:00 2001 From: suriyaprakasamr Date: Sun, 6 Sep 2026 18:34:07 +0530 Subject: [PATCH 2/2] Update comment highlighting settings in DOCX Editor with reviewed API Updated the comment highlighting feature with reviewed API for enabling highlights by author. --- .../Word/Word-Processor/javascript-es6/comments.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/javascript-es6/comments.md b/Document-Processing/Word/Word-Processor/javascript-es6/comments.md index b76562a1b7..1eb2e8328f 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es6/comments.md +++ b/Document-Processing/Word/Word-Processor/javascript-es6/comments.md @@ -179,8 +179,7 @@ container.appendTo('#container'); ## Highlight comments by author -When `highlightCommentsByAuthor' is enabled, each comment marker and pane border is displayed in the author’s avatar color. -Selecting a comment highlights the corresponding text in that color. If multiple comments appear on the same line, the marker retains the first author’s avatar color. +When `highlightCommentsByAuthor' is enabled, each comment marker and pane border is displayed in the author’s avatar color. Selecting a comment highlights the corresponding text in that color. If multiple comments appear on the same line, the marker retains the first author’s avatar color. The following example illustrates how to enable comment highlights in the DOCX Editor @@ -189,7 +188,7 @@ var container = new ej.documenteditor.DocumentEditorContainer({ enableToolbar: true, height: '590px', // Enable mention support in document editor - documentEditorSettings: { highlightCommentsByAuthor : true } + documentEditorSettings: { commentSettings: { highlightCommentsByAuthor : true } } }); ej.documenteditor.DocumentEditorContainer.Inject(ej.documenteditor.Toolbar);