Skip to content

@jsvision/code-editor / searchDocument

Function: searchDocument() ​

searchDocument(snapshot, query, options?): readonly DocumentSearchMatch[]

Defined in: code-editor/src/document/search.ts:30

Finds literal matches without mutating document or history state.

Parameters ​

snapshot ​

DocumentSnapshot

query ​

string

options? ​

DocumentSearchOptions = {}

Returns ​

readonly DocumentSearchMatch[]

Example ​

ts
const matches = searchDocument(snapshot, 'value');