diff --git a/Document-Processing/Word/Word-Processor/asp-net-core/comments.md b/Document-Processing/Word/Word-Processor/asp-net-core/comments.md index a29718651d..da8ad26fa7 100644 --- a/Document-Processing/Word/Word-Processor/asp-net-core/comments.md +++ b/Document-Processing/Word/Word-Processor/asp-net-core/comments.md @@ -157,6 +157,20 @@ The following example illustrates how to enable mention support in DOCX Editor {% endhighlight %} {% endtabs %} +## 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 + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/document-editor/asp-net-core/document-editor-container/comment-highlights/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="comment-highlights.cs" %} +{% include code-snippet/document-editor/asp-net-core/document-editor-container/comment-highlights/document-editor.cs %} +{% endhighlight %} +{% endtabs %} ## Events diff --git a/Document-Processing/Word/Word-Processor/asp-net-mvc/comments.md b/Document-Processing/Word/Word-Processor/asp-net-mvc/comments.md index e41ceb6dcd..2bac62837b 100644 --- a/Document-Processing/Word/Word-Processor/asp-net-mvc/comments.md +++ b/Document-Processing/Word/Word-Processor/asp-net-mvc/comments.md @@ -159,6 +159,20 @@ The following example illustrates how to enable mention support in the DOCX Edit {% endhighlight %} {% endtabs %} +## 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 + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/document-editor/asp-net-mvc/document-editor-container/comment-highlights/razor %} +{% endhighlight %} +{% highlight c# tabtitle="comment-highlights.cs" %} +{% include code-snippet/document-editor/asp-net-mvc/document-editor-container/comment-highlights/document-editor.cs %} +{% endhighlight %} +{% endtabs %} ## Events diff --git a/Document-Processing/Word/Word-Processor/blazor/comments.md b/Document-Processing/Word/Word-Processor/blazor/comments.md index 5e150095cf..aabdf5b5e3 100644 --- a/Document-Processing/Word/Word-Processor/blazor/comments.md +++ b/Document-Processing/Word/Word-Processor/blazor/comments.md @@ -47,6 +47,26 @@ You can delete all the comments in the document using [`DeleteAllCommentsAsync`] await container.DocumentEditor.Editor.DeleteAllCommentsAsync(); ``` +## 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 + + +```csharp + +@using Syncfusion.Blazor.DocumentEditor; + + + + +@code { + SfDocumentEditorContainer container; + DocumentEditorSettingsModel settings = new DocumentEditorSettingsModel() { commentSettings: { highlightCommentsByAuthor : true } }; +} +``` + ## Protect the document in comments-only mode The DOCX Editor supports a special protection mode that restricts user actions to adding or editing comments only. When `CommentsOnly` protection is active, users cannot change the document content. diff --git a/Document-Processing/code-snippet/document-editor/asp-net-core/document-editor-container/comment-highlights/document-editor.cs b/Document-Processing/code-snippet/document-editor/asp-net-core/document-editor-container/comment-highlights/document-editor.cs new file mode 100644 index 0000000000..048a3eb88c --- /dev/null +++ b/Document-Processing/code-snippet/document-editor/asp-net-core/document-editor-container/comment-highlights/document-editor.cs @@ -0,0 +1,5 @@ +public ActionResult Default() +{ + return View(); +} + diff --git a/Document-Processing/code-snippet/document-editor/asp-net-core/document-editor-container/comment-highlights/razor b/Document-Processing/code-snippet/document-editor/asp-net-core/document-editor-container/comment-highlights/razor new file mode 100644 index 0000000000..92a4a6e804 --- /dev/null +++ b/Document-Processing/code-snippet/document-editor/asp-net-core/document-editor-container/comment-highlights/razor @@ -0,0 +1,12 @@ +@Html.EJS().DocumentEditorContainer("container").Created("onCreated").EnableToolbar(true).Render() + + \ No newline at end of file diff --git a/Document-Processing/code-snippet/document-editor/asp-net-core/document-editor-container/comment-highlights/tagHelper b/Document-Processing/code-snippet/document-editor/asp-net-core/document-editor-container/comment-highlights/tagHelper new file mode 100644 index 0000000000..677ed9aa24 --- /dev/null +++ b/Document-Processing/code-snippet/document-editor/asp-net-core/document-editor-container/comment-highlights/tagHelper @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/Document-Processing/code-snippet/document-editor/asp-net-mvc/document-editor-container/comment-highlights/document-editor.cs b/Document-Processing/code-snippet/document-editor/asp-net-mvc/document-editor-container/comment-highlights/document-editor.cs new file mode 100644 index 0000000000..048a3eb88c --- /dev/null +++ b/Document-Processing/code-snippet/document-editor/asp-net-mvc/document-editor-container/comment-highlights/document-editor.cs @@ -0,0 +1,5 @@ +public ActionResult Default() +{ + return View(); +} + diff --git a/Document-Processing/code-snippet/document-editor/asp-net-mvc/document-editor-container/comment-highlights/razor b/Document-Processing/code-snippet/document-editor/asp-net-mvc/document-editor-container/comment-highlights/razor new file mode 100644 index 0000000000..92a4a6e804 --- /dev/null +++ b/Document-Processing/code-snippet/document-editor/asp-net-mvc/document-editor-container/comment-highlights/razor @@ -0,0 +1,12 @@ +@Html.EJS().DocumentEditorContainer("container").Created("onCreated").EnableToolbar(true).Render() + + \ No newline at end of file diff --git a/Document-Processing/code-snippet/document-editor/asp-net-mvc/document-editor-container/comment-highlights/tagHelper b/Document-Processing/code-snippet/document-editor/asp-net-mvc/document-editor-container/comment-highlights/tagHelper new file mode 100644 index 0000000000..677ed9aa24 --- /dev/null +++ b/Document-Processing/code-snippet/document-editor/asp-net-mvc/document-editor-container/comment-highlights/tagHelper @@ -0,0 +1,13 @@ + + + + \ No newline at end of file