Javascript: InputFormat.getTopFrameLine Method
Description
Gets a value specifying whether there is a frame line at the top of the text.
Syntax
<void> InputFormat.getTopFrameLine(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives whether there is a frame line at the top of the text as parameter. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates InputFormat.getTopFrameLine in a practical document-editing workflow. It gets a value specifying whether there is a frame line at the top of the text.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.inputFormat.getTopFrameLine(
function(result) {
if (result) {
console.log("get top frame line is available.");
} else {
console.warn("get top frame line is not available in the current document state.");
}
},
onTxError
);