Javascript: ParagraphFormat.getKeepLinesTogether Method
Description
Gets a value indicating whether a page break is allowed within the paragraph.
Syntax
<void> ParagraphFormat.getKeepLinesTogether(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives a value indicating whether a page break is allowed within the paragraph. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates ParagraphFormat.getKeepLinesTogether in a practical document-editing workflow. It gets a value indicating whether a page break is allowed within the paragraph.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.paragraphFormat.getKeepLinesTogether(
function(result) {
if (result) {
console.log("get keep lines together is available.");
} else {
console.warn("get keep lines together is not available in the current document state.");
}
},
onTxError
);