Javascript: ListFormat.setType Method
Description
Sets the type of the list, bulleted, numbered or none.
Syntax
<void> ListFormat.setType(<ListType> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| value | The list type: bulleted, numbered or none. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates ListFormat.setType in a practical document-editing workflow. It sets the type of the list, bulleted, numbered or none.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.listFormat.setType(
TXTextControl.ListType.Bulleted,
function() {
console.log("set type completed.");
},
onTxError
);