Javascript: FormattedText.selection Property
Description
Gets the current selection.
Syntax
<Selection> FormattedText.selectionExamples
The following example demonstrates FormattedText.selection in a practical document-editing workflow. It gets the current selection.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.textParts.getMainText(function(formattedText) {
const selection = formattedText.selection;
console.log("selection:", selection);
}, onTxError);Limitations
Read Only.