Javascript: ListFormat.getNumberFormat Method
Description
Gets the number format for a numbered list.
Syntax
<void> ListFormat.getNumberFormat(<RequestNumberFormatCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the number format for a numbered list. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates ListFormat.getNumberFormat in a practical document-editing workflow. It gets the number format for a numbered list.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.listFormat.getNumberFormat(
function(result) {
if (!result) {
console.warn("No number format was returned.");
return;
}
console.log("get number format result:", result);
},
onTxError
);