Javascript: ListFormat.getType Method
Description
Gets the type of the list, bulleted, numbered or none.
Syntax
<void> ListFormat.getType(<RequestTextTypeCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the type of the list, bulleted, numbered or none. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates ListFormat.getType in a practical document-editing workflow. It gets 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.getType(
function(textType) {
if (!textType) {
console.warn("No text type was returned.");
return;
}
console.log("get type result:", textType);
},
onTxError
);