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:

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

Returns: SelectionRangeThe new selection range.