Find and Replace
Search, navigate and replace text from a toolbar popover.
The search field waits for the input method to commit before it searches, so composing a character never moves the highlights mid-word.
Preview
Installation
Add the item with the shadcn CLI, or copy the source manually.
pnpm dlx shadcn@latest add litingyes/blocove/rich-text-editor-find-and-replaceRequires a shadcn/ui project set up with Base UI primitives. Blocove is developed against the b0 preset, but it installs no base config or theme tokens: your own preset, fonts and colors stay in place.
Or install from the namespace after adding the registry: npx shadcn@latest add @blocove/rich-text-editor-find-and-replace
typeset.css next to your stylesheet, import it after Tailwind and add the .typeset-docs preset. See the Rich text editor setup.API Reference
Props accepted by the exported components.
EditorFindAndReplace
Registers the search plugin and its commands. Options pass through to the extension.
| Prop | Type | Default |
|---|---|---|
searchTerm | string | "" |
replaceTerm | string | "" |
caseSensitive | boolean | false |
useRegex | boolean | false |
wholeWord | boolean | false |
searchDebounceMs | number | 250 |
EditorFindAndReplaceToolbar
Popover with the search field, the replacement field, the result counter and the navigation and replace actions.
| Prop | Type | Default |
|---|---|---|
className | string | - |