Search and Replace plugin
Find and replace content in TinyMCE.
Contribute to this pageThis plugin adds search/replace dialogs to TinyMCE. It also adds a toolbar button and the menu item Find and replace
under the Edit
menu dropdown.
Basic setup
tinymce.init({
selector: 'textarea', // change this value according to your HTML
plugins: 'searchreplace',
menubar: 'edit',
toolbar: 'searchreplace'
});
Toolbar buttons
The Search and Replace plugin provides the following toolbar buttons:
Toolbar button identifier | Description |
---|---|
searchreplace | Searches and/or Replaces contents within the editor. |
These toolbar buttons can be added to the editor using:
- The
toolbar
configuration option. - The
quickbars_insert_toolbar
configuration option. - Custom Context toolbars.
Menu items
The Search and Replace plugin provides the following menu items:
Menu item identifier | Default Menu Location | Description |
---|---|---|
searchreplace | Edit | Opens the search/replace dialog. |
These menu items can be added to the editor using:
- The
menu
configuration option. - The
contextmenu
configuration option. - Custom Menu toolbar buttons.
Commands
The Search and Replace plugin provides the following JavaScript command.
Command | Description |
---|---|
SearchReplace | Opens the search and replace dialog. |
Example
tinymce.activeEditor.execCommand('SearchReplace');
Was this article helpful? Yes - No
Well, that's awkward . Would you mind opening an issue or helping us out?
Thanks for the feedback!
Can't find what you're looking for? Let us know.
Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.