Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 17 additions & 38 deletions Document-Processing/Word/Word-Processor/asp-net-core/comments.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
layout: post
title: Comments in Document Editor Control | Syncfusion
description: Learn here all about comments in Syncfusion Document Editor control of Syncfusion Essential JS 2 and more.
title: Comments in DOCX Editor Control | Syncfusion
description: Learn here all about comments in Syncfusion DOCX Editor control of Syncfusion Essential JS 2 and more.
platform: document-processing
control: Comments
documentation: ug
---


# Comments in ASP.NET Core in Document Editor Component
# Comments in ASP.NET Core DOCX Editor Component

[ASP.NET Core DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/asp-net-core-docx-editor) (Document Editor) allows to add comments to documents. You can add, navigate and remove comments in code and from the UI.
[ASP.NET Core DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/asp-net-core-docx-editor) (Document Editor) lets you add comments to documents. You can add, navigate, and remove comments in code and from the UI.

## Add a new comment

Expand All @@ -22,28 +22,7 @@ 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.

```typescript
// In this example, a comment with the text "Nancy Davolio" is added by the author Rachel Green 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.
let specificDate = new Date(2024, 6, 23, 14, 30, 0); // Note: July is represented by 6 (0-based index).

// Define the properties of the comment including author, date, and resolution status.
let 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 New Comment with Date, Author, and Status

Comments can be inserted into the selected text with a specified date, author, and status `insertComment`.
Comments can be inserted into the selected text with a specified date, author, and status using `insertComment`.

```typescript
// In this example, a comment with the text "Hello world"
Expand All @@ -62,13 +41,13 @@ var commentProperties = {
isResolved: false // The status of the comment; false indicates it is unresolved.
};

// Insert the comment with the specified properties into the document editor.
// Insert the comment with the specified properties into the DOCX 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`.
Reply comments can be inserted into the parent comment with a specified date, author, and status using `insertReplyComment`.

```typescript
// In this example, a comment with the text "Hello world"
Expand All @@ -86,15 +65,15 @@ var commentProperties = {
isResolved: false // The status of the comment; false indicates it is unresolved.
};

// Insert the comment with the specified properties into the Document Editor.
// Insert the comment with the specified properties into the DOCX Editor.
var comment = documentEditor.editor.insertComment('Hello world', commentProperties);
// Insert a reply comment with specified properties into the Document Editor
// Insert a reply comment with specified properties into the DOCX 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`.
DOCX Editor lets you get the comments along with their replies and comment properties using `getComments`. The returned object is an array of comments, where each comment exposes `id`, `author`, `dateTime`, `isResolved`, and a `replies` array containing the reply comments with the same properties.

```typescript
//Get Comments in the document along with the properties author, date, status.
Expand All @@ -113,7 +92,7 @@ documentEditor.selection.navigateNextComment();
documentEditor.selection.navigatePreviousComment();
```

## Delete comment
## Delete a comment

Current comment can be deleted using `deleteComment`.

Expand All @@ -131,7 +110,7 @@ container.documentEditor.editor.deleteComment(commentinfo[0].id);
container.documentEditor.editor.deleteComment(commentinfo[0].replies[0].id);
```

## Delete all comment
## Delete all comments

All the comments in the document can be deleted using the below code snippet.

Expand All @@ -141,9 +120,9 @@ documentEditor.editor.deleteAllComments();

## Protect the document in comments only mode

Document Editor provides support for protecting the document with `CommentsOnly` protection. In this protection, user is allowed to add or edit comments alone in the document.
DOCX Editor provides support for protecting the document with `CommentsOnly` protection. In this protection, the user can only add or edit comments in the document.

Document editor provides an option to protect and unprotect document using `enforceProtection` and `stopProtection` API.
DOCX Editor provides an option to protect and unprotect the document using `enforceProtection` and `stopProtection` API.


{% tabs %}
Expand All @@ -166,7 +145,7 @@ N> In enforce Protection method, first parameter denotes password and second par

Mention support displays a list of items that users can select or tag from the suggested list. To use this feature, type the `@` character in the comment box and select or tag the user from the suggestion list.

The following example illustrates how to enable mention support in Document Editor
The following example illustrates how to enable mention support in DOCX Editor


{% tabs %}
Expand All @@ -181,7 +160,7 @@ The following example illustrates how to enable mention support in Document Edit

## Events

DocumentEditor provides `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` object as an argument, which allows access to information about the comment.
DocumentEditor provides `beforeCommentAction` event, which is triggered on comment actions like Post, edit, reply, resolve, and reopen, allowing you to perform custom logic on these actions. The event handler receives the `CommentActionEventArgs` object as an argument, which allows access to information about the comment.

To demonstrate a specific use case, let’s consider an example where we want to restrict the delete functionality based on the author’s name. The following code snippet illustrates how to allow only the author of a comment to delete:

Expand All @@ -197,4 +176,4 @@ To demonstrate a specific use case, let’s consider an example where we want to

## Online Demo

Explore how to add, view, and manage comments in Word documents using the ASP.NET Core Document Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/asp-net-core/documenteditor/comments#/tailwind3).
Explore how to add, view, and manage comments in Word documents using the ASP.NET Core DOCX Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/asp-net-core/documenteditor/comments#/tailwind3).
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
---
layout: post
title: Content Control in Syncfusion Document Editor Component
description: Learn here all about Content Control in Syncfusion Document Editor component of Syncfusion Essential JS 2 and more.
title: Content Control in Syncfusion DOCX Editor Component
description: Learn here all about Content Control in Syncfusion DOCX Editor component of Syncfusion Essential JS 2 and more.
platform: document-processing
control: Content Control
documentation: ug
---


# Content Control in ASP.NET Core in DocumentEditor
# Content Control in ASP.NET Core DOCX Editor

[ASP.NET Core DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/asp-net-core-docx-editor) (Document Editor) provides support for inserting, editing content controls.

Content controls can be categorized based on its occurrence in a document as follows,
Content controls can be categorized based on their occurrence in a document as follows:

InlineContentControl: Among inline content inside, as a child of a paragraph. BlockContentControl: Among paragraphs and tables, as a child of a Body, HeaderFooter.
**Inline Content Control:** Among inline content within a paragraph as a child element.
**Block Content Control:** Among paragraphs and tables as a child of a Body or Header/Footer.

## Types of Content Controls

Expand All @@ -32,7 +33,7 @@ Content control can be inserted using `insertContentControl` method in editor mo
{% highlight ts %}
//Insert Rich Text Content Control
container.documentEditor.editor.insertContentControl('RichText');
//Insert Rich Text Content Control with default sfdt string
//Insert Rich Text Content Control with default SFDT value
var sfdt = {"sections":[{"blocks":[{"inlines":[{"text": "Hello"}]}]}]};
container.documentEditor.editor.insertContentControl('RichText', sfdt);

Expand All @@ -43,7 +44,7 @@ container.documentEditor.editor.insertContentControl('Text', 'Hello World');

//Insert CheckBox Content Control
container.documentEditor.editor.insertContentControl('CheckBox');
//Insert CheckBox Content Control with mention checked state
//Insert CheckBox Content Control with a checked state
container.documentEditor.editor.insertContentControl('CheckBox', true);

//Insert ComboBox Content Control
Expand All @@ -53,7 +54,7 @@ container.documentEditor.editor.insertContentControl('ComboBox', 'One', ['One',

//Insert Date Content Control
container.documentEditor.editor.insertContentControl('Date');
//Insert Date Content Control
//Insert Date Content Control with default date
container.documentEditor.editor.insertContentControl('Date', '01/01/2024');

//Insert DropDownList Content Control
Expand All @@ -69,25 +70,26 @@ container.documentEditor.editor.insertContentControl('Picture', 'data:image/png;

## Import content control properties

Content control properties can be set using the `ContentControlInfo` and import it using `importContentControlData`
Content control properties can be set using the `ContentControlInfo` object and imported using the `importContentControlData` method.

{% highlight ts %}
var data = [];
var contentControlData = { title: placeHolderPrefix + 'Name', tag: '', value: 'John', canDelete: false, canEdit: false, type: 'RichText' };
data.push(contentControlData);
container.documentEditor.importContentControlData(data);
{% endhighlight %}

## Export content control properties

Content control properties can be exported using the `exportContentControlData`
Content control properties can be exported using the `exportContentControlData` method.

{% highlight ts %}
var contentControlInfos = container.documentEditor.exportContentControlData();
{% endhighlight %}

## Reset content control

Content control properties can be reset using the `resetContentControlData`
Content control properties can be reset using the `resetContentControlData` method.

{% highlight ts %}
var data = [];
Expand Down
22 changes: 11 additions & 11 deletions Document-Processing/Word/Word-Processor/asp-net-core/dialog.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
layout: post
title: Dialog in Document Editor Component | Syncfusion
description: Learn here all about dialog in Syncfusion Document Editor component of Syncfusion Essential JS 2 and more.
title: Dialog in DOCX Editor Component | Syncfusion
description: Learn here all about dialog in Syncfusion DOCX Editor component of Syncfusion Essential JS 2 and more.
platform: document-processing
control: Dialog
documentation: ug
---


# Dialog in ASP.NET Core in Document Editor Component
# Dialog in ASP.NET Core DOCX Editor Component

[ASP.NET Core DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/asp-net-core-docx-editor) (Document Editor) provides dialog support to major operations such as insert or edit hyperlink, formatting text, paragraph, style, list and table properties.
[ASP.NET Core DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/asp-net-core-docx-editor) (Document Editor) provides dialog support to major operations such as inserting or editing hyperlinks, and formatting text, paragraph, style, list, and table properties.

## Font Dialog
## Font dialog

Font dialog allows to modify all text properties for selected contents at once such as bold, italic, underline, font size, font color, strikethrough, subscript and superscript.
The font dialog lets you modify all text properties for selected contents at once such as bold, italic, underline, font size, font color, strikethrough, subscript, and superscript.

N>To enable font dialog for a document editor instance, set enableFontDialog to true.
N> To enable the font dialog for a DOCX Editor instance, set `enableFontDialog` to true. The other dialogs covered on this page are enabled by default and do not require a separate opt-in property.


{% tabs %}
Expand Down Expand Up @@ -61,7 +61,7 @@ This dialog allows creating and inserting a table at cursor position by specifyi

## Bookmark dialog

This dialog allows to perform the following operations:
This dialog lets you perform the following operations:

* View all bookmarks.
* Navigate to a bookmark.
Expand Down Expand Up @@ -109,7 +109,7 @@ This dialog allows creating and inserting table of contents at cursor position.
{% endtabs %}


## Styles Dialog
## Styles dialog

This dialog allows managing the styles in a document. It will display all the styles in the document with options to modify the properties of the existing style or create new style with the help of ‘Style dialog’.

Expand Down Expand Up @@ -171,7 +171,7 @@ This dialog allows customizing the border style, border width, and background co

## Table options dialog

This dialog allows customizing the default cell margins and spacing between each cells of the selected table.
This dialog allows customizing the default cell margins and spacing between each cell of the selected table.


{% tabs %}
Expand Down Expand Up @@ -200,7 +200,7 @@ This dialog allows customizing the table, row, and cell properties of the select

## Page setup dialog

This dialog allows customizing margins, size, and layout options for pages of the section.
This dialog allows customizing margins, size, and layout options for the pages in a section.


{% tabs %}
Expand Down
Loading