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): SelectionRange

Parameters:

ParameterTypeDescription
startSelectionRangeThe start selection range.
forwardbooleanWhether to move forward.
by?(initial: string) => (next: string) => booleanOptional grouping function.

Returns: SelectionRange — The new selection range.