In the last blog entry, the new document protection feature of TX Text Control X15 has been explained. Documents can be protected by restricting the formatting and editing of content.
Editable regions are exceptions within protected documents to provide specific users permissions to edit these regions while the rest of the document is read-only.
The object represents an editable region in a protected document. When the property of TX Text Control has been set to ReadAndSelect, editable regions can still be edited, either by everyone or depending on the property by a certain user.
The following code inserts a new editable region at the currently selected text. The first parameter in the constructor is the property which specifies the name of the user who can edit the region. In the following code, the UserName is null which indicates that every user can edit this region:
In the next code snipped, an editable region is added at a specific selection range for the user email@example.com. The word Text is now editable for this specific user:
The document can now be protected and saved using the following code:
After loading the document, the property can be used to define a list of names specifying users who have access to editable regions. In this sample, we grant access for the user firstname.lastname@example.org:
This is only one of many great new features of TX Text Control X15. Download your trial version today and test this on your own.