Skip to main content

RichEditSelection.goToPreviousLine Method

Moves the cursor to the previous line and allows you to extend the selection.

Declaration

goToPreviousLine(
    extendSelection?: boolean
): void

Parameters

Name Type Description
extendSelection boolean

true to extend the selection; otherwise, false.

Remarks

Moves the cursor one line up. If the current line is the first one, moves the cursor to the start of the current line.

Use the goToLineStart/goToLineEnd method to move the cursor to the start/end of the line.

// Moves the cursor to the start of the previous line
richEdit.selection.goToPreviousLine(false);
richEdit.selection.goToLineStart(false);

Refer to the following section for more information: Client Selection.

See Also