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