This example demonstrates document protection support in document editor to restrict the types of changes can be made to the document by a user/user group.
In this demo, the Document editor opens a protected document that includes permitted ranges for two users identified by email: each user is authorized to edit a separate text area.
You can switch between the current user to edit different parts by selecting dropdown list in User permissions pane.
User can add the user in dropdown who have editing permission in document by using addItem method.
More information about the document editor features can be found in this documentation section.