Search and Replace
Plugin alias: searchreplace
editor42.init({
plugins: 'searchreplace'
});
Provides find-and-replace functionality through a dialog that supports case-sensitive matching, whole-word matching, and search-within-selection. Matches are highlighted with the class editor42-m-match-marker, with the active match additionally receiving editor42-m-match-marker-selected.
Commands
| Command | Description |
|---|---|
SearchReplace | Opens the Find and Replace dialog. |
Toolbar buttons
| Button | Type | Description |
|---|---|---|
searchreplace | Button | Opens the Find and Replace dialog. |
Menu items
| Item | Description |
|---|---|
searchreplace | Opens the Find and Replace dialog. |
API
| Method | Description |
|---|---|
find(text, matchCase, wholeWord, inSelection?) | Finds and marks matches, returns count. |
next() | Moves to next match. |
prev() | Moves to previous match. |
replace(text, forward?, all?) | Replaces current or all matches. |
done(keepEditorSelection?) | Removes all markers, resets state. |
Keyboard shortcuts
| Shortcut | Action |
|---|---|
Ctrl+F / Cmd+F | Opens the Find and Replace dialog. |