Adds a new editable region to the document. Its position is defined through the start and length parameters. If the editable region's length is zero, the current text selection is used to define the position.

Introduced: X18.

<void> EditableRegionCollection.add(<string> username, <number> id, <number> start, <number> length, [<AddEditableRegionCallback> callback], [<ErrorCallback> errorCallback])

Parameters

Parameter Description
username The name of the user who can edit the region.
id The editable region's identifier.
start Specifies the index (one-based) of the first character which belongs to the editable region.
length Specifies the number of characters which belong to the editable region.
callback Optional. The callback function that receives the added editable region.
errorCallback Optional. Is called when the operation failed with an error.