Javascript: TXTextControl.getUserNames Method
Description
Gets a list of names specifying users who have access to editable regions. When a document is set to read-only all editable regions that are related to these users can be edited.
Syntax
<void> TXTextControl.getUserNames(<RequestStringsCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the list of names. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TXTextControl.getUserNames in a practical document-editing workflow. It gets a list of names specifying users who have access to editable regions. When a document is set to read-only all editable regions that are related to these users can be edited.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.getUserNames(
function(result) {
console.log("get user names result:", result);
},
onTxError
);