Skip to content

EditorView.moveByChar method

EditorView › moveByChar

Official

Move a cursor position by grapheme cluster.

Signature:

moveByChar(start: SelectionRange, forward: boolean, by?: ((initial: string) => (next: string) => boolean) | undefined): SelectionRange

Parameters:

Parameter Type Description
start SelectionRange The start selection range.
forward boolean Whether to move forward.
by? ((initial: string) => (next: string) => boolean) | undefined Optional grouping function.

Returns: SelectionRangeThe new selection range.