Javascript: TXTextControl.EditMode Enumeration
Description
Determines the possible document edit modes.
Members
| Member | Description |
|---|---|
| Edit | The document's text can be edited. |
| ReadAndSelect | The document's text is read only but can be selected. |
| ReadOnly | The document's text is read only. |
| UsePassword | A dialog box to enter a password is opened to protect the edit mode. This value can only be combined with EditMode.ReadAndSelect using the bitwise or operator. |
Examples
The following example uses TXTextControl.EditMode.Edit (the document's text can be edited.) in a document-editing workflow.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.setEditMode(
TXTextControl.EditMode.Edit,
function() {
console.log("set edit mode completed.");
},
onTxError
);