TX Text Control .NET Server

SelectionBounds Object

Object|Introduced in 24.0

Description

Contains the start position and the length of a selection.

Syntax

{
   start: <number>,
   length: <number>
}

Examples

The following example demonstrates SelectionBounds in a practical document-editing workflow. It contains the start position and the length of a selection.

function inspectSelectionBounds(selectionBounds) {
    console.log("start:", selectionBounds.start);
    console.log("length:", selectionBounds.length);
}

Members

Properties

PropertyDescription
lengthThe length of the selection in characters.
startThe 0-based start character position of the selection.