SelectionCoordinatesA class representing the line & column of the selection in a textarea. Should be used in pair with the SelectionModel class.
constructor();
Implicit constructor. Takes no arguments, and does nothing except of creating a new instance.
start and endstart: LineAndColumn;
end: LineAndColumn;
Those properties represent the start and end of the selection in the form of line and column numbers. The line & column values are a 0-based index of the position.
directiondirection: SelectionDirection;
Represents the direction of the selection. Can be any value permitted by SelectionDirection type.
generategenerate(selection: SelectionModel, code: string): void;
Assigns new values to the start and end properties, based on the provided selection model and string of code from the textarea. Also updates the direction property accordingly.
selection - A SelectionModel instance containing the selection range.code - The code string where the selection was made.getget(): SelectionRange<LineAndColumn>;
Returns the selection coordinates as a range of LineAndColumn objects.
getOrderedgetOrdered(): SelectionRange<LineAndColumn>;
Returns the selection coordinates as a range of LineAndColumn objects, with the start and end values reversed if the selection direction is backward.