From c0cd06cabc5e8e93f001321c2891d1d2a294cf72 Mon Sep 17 00:00:00 2001 From: suriyaprakasamr Date: Fri, 4 Sep 2026 16:32:08 +0530 Subject: [PATCH 1/4] Document highlighting comments by author feature Added documentation for highlighting comments by author in DOCX Editor. --- .../Word-Processor/javascript-es5/comments.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Document-Processing/Word/Word-Processor/javascript-es5/comments.md b/Document-Processing/Word/Word-Processor/javascript-es5/comments.md index 7bb92fd9e9..16886719ae 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es5/comments.md +++ b/Document-Processing/Word/Word-Processor/javascript-es5/comments.md @@ -188,6 +188,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 + +```typescript +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 DocumentEditor provides the [beforeCommentAction](https://ej2.syncfusion.com/javascript/documentation/api/document-editor-container#beforecommentaction) event, which is triggered on comment actions such as Post, edit, reply, resolve, and reopen. This event provides an opportunity to perform custom logic on these comment actions. The event handler receives the [CommentActionEventArgs](https://ej2.syncfusion.com/javascript/documentation/api/document-editor/commentActionEventArgs) object as an argument, which allows access to information about the comment. From 6975fb9f8004018ff9844716befaccfa3dc09530 Mon Sep 17 00:00:00 2001 From: suriyaprakasamr Date: Fri, 4 Sep 2026 16:34:08 +0530 Subject: [PATCH 2/4] Change code block to JavaScript syntax Updated code block syntax from TypeScript to JavaScript. --- .../Word/Word-Processor/javascript-es5/comments.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Document-Processing/Word/Word-Processor/javascript-es5/comments.md b/Document-Processing/Word/Word-Processor/javascript-es5/comments.md index 16886719ae..06f226f648 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es5/comments.md +++ b/Document-Processing/Word/Word-Processor/javascript-es5/comments.md @@ -195,7 +195,7 @@ Selecting a comment highlights the corresponding text in that color. If multiple The following example illustrates how to enable comment highlights in the DOCX Editor -```typescript +```js var container = new ej.documenteditor.DocumentEditorContainer({ enableToolbar: true, height: '590px', From f7a3b635fdcf0ab879e80a58696b03468d72d5d6 Mon Sep 17 00:00:00 2001 From: suriyaprakasamr Date: Sun, 6 Sep 2026 18:32:21 +0530 Subject: [PATCH 3/4] Update comment highlighting settings in DOCX Editor with reviewed API Updated the comment highlighting feature to include comment settings with reviewed API in the DOCX Editor's configuration. --- .../Word/Word-Processor/javascript-es5/comments.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/javascript-es5/comments.md b/Document-Processing/Word/Word-Processor/javascript-es5/comments.md index 06f226f648..30617127b3 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es5/comments.md +++ b/Document-Processing/Word/Word-Processor/javascript-es5/comments.md @@ -190,8 +190,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 @@ -200,7 +199,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); From 7e3ae06a163f3c9e7175fe0e6f5e0eebe5abf8c5 Mon Sep 17 00:00:00 2001 From: Vellaisamy Auvudaiappan Date: Mon, 7 Sep 2026 14:07:26 +0530 Subject: [PATCH 4/4] Update JavaScript ES5 comments documentation --- .../Word/Word-Processor/javascript-es5/comments.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Document-Processing/Word/Word-Processor/javascript-es5/comments.md b/Document-Processing/Word/Word-Processor/javascript-es5/comments.md index 30617127b3..7260823a18 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es5/comments.md +++ b/Document-Processing/Word/Word-Processor/javascript-es5/comments.md @@ -175,9 +175,7 @@ var container = new ej.documenteditor.DocumentEditorContainer({ enableToolbar: true, height: '590px', // Enable mention support in document editor - documentEditorSettings: { - mentionSettings: { dataSource: mentionData, fields: { text: 'Name' } } - } + documentEditorSettings: { commentSettings: { highlightCommentsByAuthor : true } } }); ej.documenteditor.DocumentEditorContainer.Inject(ej.documenteditor.Toolbar); @@ -221,9 +219,7 @@ var mentionData = [ { "Name": "Andrew Fuller", "EmailId": "andrew@company.com"} ]; // Initialize DocumentEditorContainer component. - var documenteditorContainer = new ej.documenteditor.DocumentEditorContainer({ enableToolbar: true, height: '590px', beforeCommentAction:beforecomment,documentEditorSettings: { - mentionSettings: { dataSource: mentionData, fields: { text: 'Name' }}, - } }); + var documenteditorContainer = new ej.documenteditor.DocumentEditorContainer({ enableToolbar: true, height: '590px', beforeCommentAction:beforecomment,documentEditorSettings: { commentSettings: { highlightCommentsByAuthor : true } } }); ej.documenteditor.DocumentEditorContainer.Inject(ej.documenteditor.Toolbar); documenteditorContainer.serviceUrl = 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/'; //DocumentEditorContainer control rendering starts