diff --git a/Document-Processing/Word/Word-Processor/javascript-es6/comments.md b/Document-Processing/Word/Word-Processor/javascript-es6/comments.md index 480bb7f583..1eb2e8328f 100644 --- a/Document-Processing/Word/Word-Processor/javascript-es6/comments.md +++ b/Document-Processing/Word/Word-Processor/javascript-es6/comments.md @@ -177,6 +177,25 @@ 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: { commentSettings: { 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.