Javascript: InputFormat.getStyleNames Method
Description
Returns an array of the names of all formatting styles, the document contains.
Syntax
<void> InputFormat.getStyleNames(<RequestStringsCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives an array of the names of all formatting styles, the document contains. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates InputFormat.getStyleNames in a practical document-editing workflow. It returns an array of the names of all formatting styles, the document contains.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.inputFormat.getStyleNames(
function(result) {
console.log("get style names result:", result);
},
onTxError
);