aspnetcore-js-devexpress-dot-richedit-d9850015.md
A document range permission.
export class RangePermission
Refer to the following help topic for more information: Document Protection.
Returns the name of the user group with edit permission.
get group(): string
| Type | Description |
|---|---|
| string |
The group name.
|
The Rich Text Editor defines several predefined groups: administrators , contributors , current , editors , everyone , and owners. Permissions set for everyone apply to all users. Other groups have no special meaning and you can associate them with different users.
Note
If you work with RTF files, remember that this format only keeps predefined groups. Other formats allow you to create custom group definitions.
var document = richEdit.document;
document.rangePermissions.create(document.interval, '[email protected]');
document.rangePermissions.create(document.paragraphs.getByIndex(10).interval, '', 'everyone');
document.rangePermissions.protectRange([document.paragraphs.find(6).interval], '', 'editors');
Returns the zero-based index of the permission in the RangePermissionCollection.
get index(): number
| Type | Description |
|---|---|
| number |
The permission’s index.
|
You can use the getByIndex(index) method to find a permission by its index in the RangePermissionCollection object.
var firstRangePermission = richEdit.document.rangePermissions.getByIndex(0);
Returns the text buffer interval related to the range permission.
get interval(): Interval
| Type | Description |
|---|---|
| Interval |
The text buffer interval.
|
Returns the sub-document where the range permission is applied.
get subDocument(): SubDocument
| Type | Description |
|---|---|
| SubDocument |
The sub-document.
|
Returns the name of the user with edit permission.
get userName(): string
| Type | Description |
|---|---|
| string |
The username.
|
Deletes the range permission.
delete(): void