EditableRegion Object
Description
An EditableRegion object represents an editable region in a document.
Syntax
EditableRegionExamples
The following example demonstrates EditableRegion in a practical document-editing workflow. An EditableRegion object represents an editable region in a document.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectEditableRegion(editableRegion) {
editableRegion.getID(
function(result) {
console.log("get id result:", result);
},
onTxError
);
}Members
Methods
| Method | Description |
|---|---|
| getHighlightColor | Gets the highlight color for the editable region. |
| getHighlightMode | Gets a value indicating whether the editable region is highlighted. |
| getID | Gets an identifier for a editable region. |
| getLength | Gets the number of characters which belong to the editable region. |
| getStart | Gets the index (one-based) of the first character which belongs to the editable region. |
| getText | Gets the editable region's text. |
| getUserName | Gets the name of the user who can edit the region. This parameter can be null or an empty string to indicate, that no user name has been specified and the region can be edited by everyone. |
| save | Saves this editable region in a certain format and sends the result back asynchronously by calling a given callback function. |
| scrollTo | Sets the current input position to the beginning of an editable region and scrolls it into the visible part of the document. |
| setHighlightColor | Sets the highlight color for the editable region. |
| setHighlightMode | Sets a value indicating whether the editable region is highlighted. |
| setID | Sets an identifier for the editable region. |
| setUserName | Sets the name of the user who can edit the region. This parameter can be null or an empty string to indicate, that no user name has been specified and the region can be edited by everyone. |