Skip to content

Commit 67e3c9b

Browse files
Merge pull request #1505 from syncfusion-content/984889-restrictH
984889: Make Restrict editing page available in Angular
2 parents 3fb3841 + bc29690 commit 67e3c9b

File tree

2 files changed

+74
-1
lines changed

2 files changed

+74
-1
lines changed

Document-Processing-toc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2650,7 +2650,7 @@
26502650
<li><a href="/document-processing/word/word-processor/angular/right-to-left">RTL</a></li>
26512651
<li><a href="/document-processing/word/word-processor/angular/chart">Chart</a></li>
26522652
<li><a href="/document-processing/word/word-processor/angular/content-control">Content Control</a></li>
2653-
<li><a href="/document-processing/word/word-processor/angular/document-management">Document Management</a></li>
2653+
<li><a href="/document-processing/word/word-processor/angular/restrict-editing">Restrict Editing</a></li>
26542654
<li><a href="/document-processing/word/word-processor/angular/spell-check">SpellCheck</a></li>
26552655
<li><a href="/document-processing/word/word-processor/angular/global-local">Globalization</a></li>
26562656
<li><a href="/document-processing/word/word-processor/angular/notes">Footnotes and Endnotes</a></li>
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
layout: post
3+
title: Restrict editing in Angular Document editor component | Syncfusion
4+
description: Learn here all about Restrict editing in Syncfusion Angular Document editor component of Syncfusion Essential JS 2 and more.
5+
platform: document-processing
6+
control: Restrict editing
7+
documentation: ug
8+
domainurl: ##DomainURL##
9+
---
10+
11+
# Restrict Editing in Angular Document editor component
12+
13+
Document Editor provides support to restrict editing. When the protected document includes range permission, then unique user or user group only authorized to edit separate text area.
14+
15+
## Set current user
16+
17+
You can use the `currentUser` property to authorize the current document user by name, email, or user group name.
18+
19+
The following code shows how to set currentUser
20+
21+
```typescript
22+
this.container.documentEditor.currentUser = '[email protected]';
23+
```
24+
25+
## Highlighting the text area
26+
27+
You can highlight the editable region of the current user using the `userColor` property.
28+
29+
The following code shows how to set userColor.
30+
31+
```typescript
32+
this.container.documentEditor.userColor = '#fff000';
33+
```
34+
35+
You can toggle the highlight the editable region value using the "highlightEditableRanges" property.
36+
37+
The following code shows how to toggle the highlight editable region value.
38+
39+
```typescript
40+
container.documentEditor.documentEditorSettings.highlightEditableRanges = true;
41+
```
42+
43+
## Restrict Editing Pane
44+
45+
Restrict Editing Pane provides the following options to manage the document:
46+
* To apply formatting restrictions to the current document, select the allow formatting check box.
47+
* To apply editing restrictions to the current document, select the read only check box.
48+
* To add users to the current document, select more users option and add user from the popup dialog.
49+
* To include range permission to the current document, select parts of the document and choose users who are allowed to freely edit them from the listed check box.
50+
* To apply the chosen editing restrictions, click the **YES,START ENFORCING PROTECTION** button. A dialog box displays asking for a password to protect.
51+
* To stop protection, select **STOP PROTECTION** button. A dialog box displays asking for a password to stop protection.
52+
53+
The following code shows Restrict Editing Pane. To unprotect the document, use password '123'.
54+
55+
{% tabs %}
56+
{% highlight ts tabtitle="app.component.ts" %}
57+
{% include code-snippet/document-editor/angular/document-editor-container-cs1/src/app.component.ts %}
58+
{% endhighlight %}
59+
60+
{% highlight ts tabtitle="main.ts" %}
61+
{% include code-snippet/document-editor/angular/document-editor-container-cs1/src/main.ts %}
62+
{% endhighlight %}
63+
{% endtabs %}
64+
65+
{% previewsample "/document-processing/samples/document-editor/angular/document-editor-container-cs1" %}
66+
67+
> The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/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+
## See Also
69+
70+
* [How to protect the document in form filling mode](./form-fields#protect-the-document-in-form-filling-mode)
71+
* [How to protect the document in comments only mode](./comments#protect-the-document-in-comments-only-mode)
72+
* [How to protect the document in track changes only mode](./track-changes#protect-the-document-in-track-changes-only-mode)
73+
Footer

0 commit comments

Comments
 (0)