Skip to content

SearchQuery.getCursor method

SearchQuery › getCursor

Unofficial

Get a cursor for iterating over matches.

Signature:

getCursor(state: EditorState | Text, from?: number, to?: number): Iterator<SearchQueryMatch>

Parameters:

ParameterTypeDescription
stateEditorState | TextThe text or editor state to search in.
from?numberOptional start position.
to?numberOptional end position.

Returns: Iterator<SearchQueryMatch> — An iterator over match ranges.