diff --git a/ej2-asp-core-mvc/Release-notes/26.2.7.md b/ej2-asp-core-mvc/Release-notes/26.2.7.md new file mode 100644 index 0000000000..669151c20a --- /dev/null +++ b/ej2-asp-core-mvc/Release-notes/26.2.7.md @@ -0,0 +1,16 @@ +--- +title: Essential Studio for ##Platform_Name## Weekly Release Release Notes +description: Essential Studio for ##Platform_Name## Weekly Release Release Notes +platform: ej2-asp-core-mvc +documentation: ug +--- + +# Essential Studio for ##Platform_Name## Release Notes + +{% include release-info.html date="July 30, 2024" version="v26.2.7" %} + +{% directory path: _includes/release-notes/v26.2.7 %} + +{% include {{file.url}} %} + +{% enddirectory %} \ No newline at end of file diff --git a/ej2-asp-core-mvc/document-editor/comments.md b/ej2-asp-core-mvc/document-editor/comments.md index d4525f424c..db7e59d58c 100644 --- a/ej2-asp-core-mvc/document-editor/comments.md +++ b/ej2-asp-core-mvc/document-editor/comments.md @@ -21,6 +21,66 @@ Comments can be inserted to the selected text. documentEditor.editor.insertComment("Test comment"); ``` +## Add a New Comment with Date, Author, and Status + +Comments can be inserted into the selected text with a specified date, author, and status `insertComment`. + +```typescript +// In this example, a comment with the text "Hello world" +// is added by the author Nancy Davolio on July 23, 2024, at 2:30 PM. +// The isResolved status is set to false. + +// Create a specific date: July 23, 2024, at 2:30:00 PM. +// Note: July is represented by 6 (0-based index). +var specificDate = new Date(2024, 6, 23, 14, 30, 0); + + +// Define the properties of the comment including author, date, and resolution status. +var commentProperties = { + author: 'Nancy Davolio', // The author of the comment. + dateTime: specificDate, // The date and time when the comment is created. + isResolved: false // The status of the comment; false indicates it is unresolved. +}; + +// Insert the comment with the specified properties into the document editor. +documentEditor.editor.insertComment('Hello world', commentProperties); +``` + +## Add a Reply Comment with Date, Author, and Status + +Reply comments can be inserted into the parent comment with a specified date, author using `insertReplyComment`. + +```typescript +// In this example, a comment with the text "Hello world" +// is added by the author Nancy Davolio on July 23, 2024, at 2:30 PM. +// The isResolved status is set to false. + +// Create a specific date: July 23, 2024, at 2:30:00 PM. +// Note: July is represented by 6 (0-based index). +var specificDate = new Date(2024, 6, 23, 14, 30, 0); + +// Define the properties of the comment including author, date, and resolution status. +var commentProperties = { + author: 'Nancy Davolio', // The author of the comment. + dateTime: specificDate, // The date and time when the comment is created. + isResolved: false // The status of the comment; false indicates it is unresolved. +}; + +// Insert the comment with the specified properties into the Document Editor. +var comment = documentEditor.editor.insertComment('Hello world', commentProperties); +// Insert a reply comment with specified properties into the Document Editor +documentEditor.editor.insertReplyComment(comment.id, 'Hello world', commentProperties); +``` + +## Get Comments + +Document Editor allows to get the comments along with its reply and comment properties using `getComments`. + +```typescript +//Get Comments in the document along with the properties author, date, status. +var commentinfo = container.documentEditor.getComments(); +``` + ## Comment navigation Next and previous comments can be navigated using the below code snippet. @@ -35,10 +95,20 @@ documentEditor.selection.navigatePreviousComment(); ## Delete comment -Current comment can be deleted using the below code snippet. +Current comment can be deleted using `deleteComment`. ```typescript -documentEditor.editor.deleteComment(); +//Delete the current selected comment. +container.documentEditor.editor.deleteComment(); + +//Get Comments in the document along with the properties author, date, status. +let commentinfo = container.documentEditor.getComments(); + +//Delete the particular parent comments and all of its reply comments +container.documentEditor.editor.deleteComment(commentinfo[0].id); + +//Delete the particular reply comment. +container.documentEditor.editor.deleteComment(commentinfo[0].replies[0].id); ``` ## Delete all comment @@ -104,4 +174,4 @@ The following example illustrates how to enable mention support in Document Edit {% endhighlight %} {% highlight c# tabtitle="comments-mention.cs" %} {% endhighlight %}{% endtabs %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/ej2-asp-core-toc.html b/ej2-asp-core-toc.html index d744f61da4..b9a55df7a9 100644 --- a/ej2-asp-core-toc.html +++ b/ej2-asp-core-toc.html @@ -3015,7 +3015,7 @@
  • Release Notes -