Skip to content

SearchQuery.getCursor method

SearchQuery › getCursor

Unofficial

Get a cursor for iterating over matches.

Signature:

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

Parameters:

Parameter Type Description
state CmText | EditorState The text or editor state to search in.
from? number | undefined Optional start position.
to? number | undefined Optional end position.

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