Javascript: InputFormat.getNumberFormats Method
Description
Gets an array of all supported number formats for numbered and structured lists.
Syntax
<void> InputFormat.getNumberFormats(<RequestNumberFormatsCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives all supported number formats as parameter. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates InputFormat.getNumberFormats in a practical document-editing workflow. It gets an array of all supported number formats for numbered and structured lists.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.inputFormat.getNumberFormats(
function(result) {
if (!result) {
console.warn("No number format was returned.");
return;
}
console.log("get number formats result:", result);
},
onTxError
);