Javascript: ParagraphFormat.setAbsoluteLineSpacing Method
Description
Sets the line spacing of a paragraph in twips.
Syntax
<void> ParagraphFormat.setAbsoluteLineSpacing(<number> absoluteLineSpacing, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| absoluteLineSpacing | The line spacing of a paragraph in twips. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates ParagraphFormat.setAbsoluteLineSpacing in a practical document-editing workflow. It sets the line spacing of a paragraph in twips.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.paragraphFormat.setAbsoluteLineSpacing(
1,
function() {
console.log("set absolute line spacing completed.");
},
onTxError
);