Javascript: TableCellFormat.getVerticalAlignment Method
Description
Gets the vertical alignment of the text in the table cell.
Syntax
<void> TableCellFormat.getVerticalAlignment(<RequestVerticalAlignmentCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the vertical alignment. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TableCellFormat.getVerticalAlignment in a practical document-editing workflow. It gets the vertical alignment of the text in the table cell.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectVerticalAlignment(tableCellFormat) {
tableCellFormat.getVerticalAlignment(
function(alignment) {
if (!alignment) {
console.warn("No vertical alignment was returned.");
return;
}
console.log("get vertical alignment result:", alignment);
},
onTxError
);
}