Javascript: TableCell.getLength Method
Description
Gets the number of characters in the table cell. If the table cell is merged, the property returns -1.
Syntax
<void> TableCell.getLength(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the number of characters in the cell. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TableCell.getLength in a practical document-editing workflow. It gets the number of characters in the table cell. If the table cell is merged, the property returns -1.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectLength(tableCell) {
tableCell.getLength(
function(result) {
console.log("get length result:", result);
},
onTxError
);
}