Search & Replace
Search and replace text in the editor.
Installation
Run the following command to install the extension & associated toolbar component.
Usage
Settings
searchResultClass
Set classname for the search results chunks.
selectedResultClass
Set classname for the selected search result chunk.
disableRegex
Disable regex search.
Commands
setSearchTerm
Set the search term.
setReplaceTerm
Set the replace term.
replace
Replace the selected search term with the replace term.
replaceAll
Replace all instances of the search term with the replace term.
selectNextResult
Select the next search result.
selectPreviousResult
Select the previous search result.
setCaseSensitive
Set case sensitivity for the search.
Storage
Note: It's important to type the storage as the extension's storage type to access the storage properties. See docs here.
So, firstly get the storage for SearchAndReplace
extension like this 👇. Then you can access the storage properties.
searchTerm
Get the current search term from the editor storage.
replaceTerm
Get the current replace term from the editor storage.
results
Get the current search results from the editor storage.
lastSearchTerm
Get the last search term from the editor storage.
selectedResult
Get the currently selected search result index from the editor storage.
lastSelectedResult
Get the last selected search result index from the editor storage.
caseSensitive
Get the case sensitivity state from the editor storage.
lastCaseSensitive
Get the last case sensitivity state from the editor storage.