Skip to content
GitHub

prosekit/extensions/search

Options for defineSearchQuery

caseSensitive?: boolean

Indicates whether the search is case-sensitive

Default: false

literal?: boolean

By default, string search will replace \n, \r, and \t in the query with newline, return, and tab characters. When this is set to true, that behavior is disabled.

Default: false

regexp?: boolean

When true, the search string is interpreted as a regular expression.

Default: false

replace?: string

The replace text.

search: string

The search string (or regular expression).

wholeWord?: boolean

Enable whole-word matching.

Default: false

function defineSearchCommands(): SearchCommandsExtension

Defines commands for search and replace.

function defineSearchQuery(options: SearchQueryOptions): PlainExtension

Defines an extension that stores a current search query and replace string.