Javascript: ParagraphFormat.getFrameStyle Method
Description
Gets the style of the paragraph's frame.
Syntax
<void> ParagraphFormat.getFrameStyle(<RequestFrameStyleCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the style of the paragraph's frame. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates ParagraphFormat.getFrameStyle in a practical document-editing workflow. It gets the style of the paragraph's frame.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.paragraphFormat.getFrameStyle(
function(style) {
if (!style) {
console.warn("No frame style was returned.");
return;
}
console.log("get frame style result:", style);
},
onTxError
);