Javascript: TableCellBorder.setTextDistance Method
Description
Sets the distance between the table cell's border and its text in twips.
Syntax
<void> TableCellBorder.setTextDistance(<number> textDistance, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| textDistance | The distance between the table cell's border and its text in twips. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TableCellBorder.setTextDistance in a practical document-editing workflow. It sets the distance between the table cell's border and its text in twips.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function configureTextDistance(tableCellBorder) {
tableCellBorder.setTextDistance(
1440,
function() {
console.log("set text distance completed.");
},
onTxError
);
}