Javascript: ParagraphFormat.getLineSpacing Method
Description
Gets the line spacing of a paragraph as a percentage of the font size.
Syntax
<void> ParagraphFormat.getLineSpacing(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the line spacing of a paragraph as a percentage of the font size. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates ParagraphFormat.getLineSpacing in a practical document-editing workflow. It gets the line spacing of a paragraph as a percentage of the font size.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.paragraphFormat.getLineSpacing(
function(result) {
console.log("get line spacing result:", result);
},
onTxError
);