Skip to content

Commit 39cef77

Browse files
Integrated latest changes at 05-02-2025 10:30:12 PM
1 parent 062ee36 commit 39cef77

40 files changed

+328
-18
lines changed

ej2-angular/document-editor/comments.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ export class AppComponent implements OnInit {
171171
}
172172
```
173173

174+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.
175+
174176
Comment only protection can be enabled in UI by using [Restrict Editing pane](../document-editor/document-management#restrict-editing-pane)
175177

176178
![Enable comment only protection](images/commentsonly.png)
@@ -203,3 +205,49 @@ export class AppComponent implements OnInit {
203205
}
204206
}
205207
```
208+
209+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.
210+
211+
## Events
212+
213+
DocumentEditor provides [beforeCommentAction](../api/document-editor/#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](../api/document-editor/commentActionEventArgs) object as an argument, which allows access to information about the comment.
214+
215+
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:
216+
217+
```typescript
218+
import { Component, OnInit, ViewChild} from '@angular/core';
219+
import { ToolbarService , DocumentEditorSettingsModel, DocumentEditorContainerModule, CommentActionEventArgs, DocumentEditorContainerComponent, beforeCommentActionEvent } from '@syncfusion/ej2-angular-documenteditor';
220+
@Component({
221+
imports: [
222+
DocumentEditorContainerModule
223+
],
224+
standalone: true,
225+
selector: 'app-root',
226+
// specifies the template string for the DocumentEditorContainer component
227+
template: `<ejs-documenteditorcontainer serviceUrl="https://services.syncfusion.com/angular/production/api/documenteditor/" height="600px" style="display:block" #documenteditor_default [documentEditorSettings]= "settings" (beforeCommentAction)="beforeComment($event)" [enableToolbar]=true> </ejs-documenteditorcontainer>`,
228+
providers: [ToolbarService]
229+
})
230+
export class AppComponent implements OnInit {
231+
@ViewChild('documenteditor_default', { static: true })
232+
public container!: DocumentEditorContainerComponent;
233+
public mentionData: any = [
234+
{ "Name": "Mary Kate", "EmailId": "marry@company.com" },
235+
{ "Name": "Andrew James", "EmailId": "james@company.com" },
236+
{ "Name": "Andrew Fuller", "EmailId": "andrew@company.com" }
237+
];
238+
public settings: DocumentEditorSettingsModel = { mentionSettings: { dataSource: this.mentionData, fields: { text: 'Name' } } };
239+
ngOnInit(): void {
240+
this.container.currentUser="Guest User";
241+
}
242+
// Event get triggerd on comment actions like Post, edit, reply, resolve and reopen
243+
public beforeComment(args: CommentActionEventArgs) {
244+
// Check the type and author of the comment and current user are different
245+
if (args.type === "Delete" && this.container.currentUser !== args.author) {
246+
// Cancel the comment action
247+
args.cancel = true;
248+
}
249+
}
250+
}
251+
```
252+
253+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.

ej2-angular/document-editor/document-management.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ The following code shows Restrict Editing Pane. To unprotect the document, use p
6464

6565
{% previewsample "page.domainurl/samples/document-editor/document-editor-container-cs1" %}
6666

67+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.
68+
6769
## See Also
6870

6971
* [How to protect the document in form filling mode](../document-editor/form-fields#protect-the-document-in-form-filling-mode)

ej2-angular/document-editor/form-fields.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,6 @@ export class AppComponent implements OnInit {
156156
}
157157
```
158158

159+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.
160+
159161
>Note: In enforce Protection method, first parameter denotes password and second parameter denotes protection type. Possible values of protection type are `NoProtection |ReadOnly |FormFieldsOnly |CommentsOnly`. In stop protection method, parameter denotes the password.

ej2-angular/document-editor/getting-started.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ export class AppComponent implements OnInit {
151151

152152
```
153153

154+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.
155+
154156
#### Run the DocumentEditorContainer application
155157

156158
The quickstart project is configured to compile and run the application in a browser. Use the following command to run the application.
@@ -173,7 +175,9 @@ DocumentEditorContainer output will be displayed as follows.
173175

174176
{% previewsample "page.domainurl/samples/document-editor/document-editor-container-cs2" %}
175177

176-
>Note: If you see a license banner when running your application, it means that you need to obtain a license key and register it within the application in order to use Syncfusion<sup style="font-size:70%">&reg;</sup> components. You can find more information on how to obtain and register a license key on our [Licensing overview](../licensing/overview/) page.
178+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.
179+
180+
>Note: If you see a license banner when running your application, it means that you need to obtain a license key and register it within the application in order to use Syncfusion components. You can find more information on how to obtain and register a license key on our [Licensing overview](../licensing/overview/) page.
177181
178182
### DocumentEditor Component
179183

@@ -205,6 +209,8 @@ export class AppComponent implements OnInit {
205209

206210
```
207211

212+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.
213+
208214
#### Run the DocumentEditor application
209215

210216
The quickstart project is configured to compile and run the application in a browser. Use the following command to run the application.
@@ -227,7 +233,8 @@ Output will be displayed as follows.
227233

228234
{% previewsample "page.domainurl/samples/document-editor/getting-started-cs1" %}
229235

230-
>Note: If you see a license banner when running your application, it means that you need to obtain a license key and register it within the application in order to use Syncfusion<sup style="font-size:70%">&reg;</sup> components. You can find more information on how to obtain and register a license key on our [Licensing overview](../licensing/overview/) page.
236+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.
237+
231238

232239
## Frequently Asked Questions
233240

ej2-angular/document-editor/how-to/auto-save-document-in-document-editor.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ export class AppComponent {
7979
}
8080
```
8181

82+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.
83+
8284
* In server-side, configure the access key and secret key in `web.config` file and register profile in `startup.cs`.
8385

8486
In `web.config`, add key like below format:

ej2-angular/document-editor/how-to/auto-save-document.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ export class AppComponent implements OnInit {
8787
}
8888
```
8989

90+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.
91+
9092
* In server-side, Receives the stream content from client-side and process it to save the document in Server or Database from the received stream. Add Web API in controller file like below to save the document.
9193

9294
```c#

ej2-angular/document-editor/how-to/change-document-view.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ export class AppComponent {
5252
}
5353
```
5454

55+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.
56+
5557
>Note: Default value of [`layoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor#layouttype) in DocumentEditor component is [`Pages`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/layoutType/).
5658
5759
## How to change the document view in DocumentEditorContainer component
@@ -80,4 +82,6 @@ export class AppComponent {
8082
}
8183
```
8284

85+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.
86+
8387
>Note: Default value of [`layoutType`](https://ej2.syncfusion.com/angular/documentation/api/document-editor#layouttype) in DocumentEditorContainer component is [`Pages`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/layoutType/).

ej2-angular/document-editor/how-to/change-the-default-search-highlight-color.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ export class AppComponent implements OnInit {
4646
}
4747
```
4848

49+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.
50+
4951
Output will be like below:
5052

5153
![How to change the default search highlight color](../images/search-color.png)

ej2-angular/document-editor/how-to/customize-color-picker.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ export class AppComponent implements OnInit {
5252
}
5353
```
5454

55+
> The Web API hosted link `https://services.syncfusion.com/angular/production/api/documenteditor/` utilized in the Document 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.
56+
5557
| Property | Behaviour |
5658
|---|---|
5759
| columns | It is used to render the ColorPicker palette with specified columns. Defaults to 10 |
@@ -60,3 +62,5 @@ export class AppComponent implements OnInit {
6062
| modeSwitcher | It is used to show / hide the mode switcher button of ColorPicker component. Defaults to true |
6163
| showButtons | It is used to show / hide the control buttons (apply / cancel) of ColorPicker component. Defaults to true |
6264

65+
66+
>**Note**: According to the Word document specifications, it is not possible to modify the **`Predefined Highlight colors`**. This limitation means that the range of highlight colors provided by default cannot be customized or expanded upon by the user to suit individual preferences. Consequently, users must work within the confines of the existing color palette, as no functionality currently exists to modify or personalize these predefined highlighting options.

0 commit comments

Comments
 (0)