Skip to content
GitHubDiscord

prosekit/extensions/search

Options for defineSearchQuery

search: string

The search string (or regular expression).

replace?: string

The replace text.

caseSensitive?: boolean

Indicates whether the search is case-sensitive

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.

false

regexp?: boolean

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

false

wholeWord?: boolean

Enable whole-word matching.

false

function defineSearchQuery(options: SearchQueryOptions): PlainExtension

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


function defineSearchCommands(): SearchCommandsExtension

Defines commands for search and replace.