Skip to content

CodeMirrorEditorSearchCursor

Unofficial

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

Import:

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

Signature:

export interface CodeMirrorEditorSearchCursor

Methods

Method Returns Description
find(reverse?) boolean Find the next or previous match. Returns true if a match was found.
findNext() boolean Find the next match. Returns true if a match was found.
findPrevious() boolean Find the previous match. Returns true if a match was found.
from() EditorPosition | void Get the start position of the current match, or void if no match.
replace(text) void Replace the current match with the given text.
to() EditorPosition | void Get the end position of the current match, or void if no match.

Links to this page: