Javascript: TextPart.selection Property
Description
Obsolete. This property will be removed in one of the next versions. The getter returns an object of type Selection. The setter changes the selection to a given start position and a given length using an object of type SelectionBounds.
Syntax
<Selection> TextPart.selectionExamples
The following example demonstrates TextPart.selection in a practical document-editing workflow. Obsolete. This property will be removed in one of the next versions. The getter returns an object of type Selection. The setter changes the selection to a given start position and a given length using an object of type SelectionBounds.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.textParts.getMainText(function(textPart) {
const selection = textPart.selection;
console.log("selection:", selection);
}, onTxError);