Skip to content

CodeMirrorEditorSearchCursor

Unofficial

A cursor for iterating over search matches in the editor document.

Import:

import type { CodeMirrorEditorSearchCursor } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface CodeMirrorEditorSearchCursor

Methods

MethodReturnsDescription
find(reverse?)booleanFind the next or previous match. Returns true if a match was found.
findNext()booleanFind the next match. Returns true if a match was found.
findPrevious()booleanFind the previous match. Returns true if a match was found.
from()EditorPosition | voidGet the start position of the current match, or void if no match.
replace(text)voidReplace the current match with the given text.
to()EditorPosition | voidGet the end position of the current match, or void if no match.

Links to this page: