Javascript: Selection.getCharacterScaling Method
Description
Gets or sets the style's character scaling, in percent of the average character width.
Syntax
<void> Selection.getCharacterScaling([<RequestNumberCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates Selection.getCharacterScaling in a practical document-editing workflow. It gets or sets the style's character scaling, in percent of the average character width.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.selection.getCharacterScaling(
function(result) {
console.log("get character scaling result:", result);
},
onTxError
);