=== Search & Replace Text in Blocks ===
Contributors: fernandot, ayudawp
Tags: search, replace, gutenberg, blocks, editor
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Search and replace text within Gutenberg text blocks directly from the block editor.

== Description ==

Search & Replace Text in Blocks adds a powerful search and replace functionality to the WordPress block editor (Gutenberg). Quickly find and replace text across all your content blocks without leaving the editor.

**Features:**

* Search text across all text-based blocks (paragraphs, headings, lists, quotes, etc.)
* Replace single occurrences or all matches at once
* Built-in Undo button to revert changes
* Case-sensitive search option
* Whole word matching option
* Visual highlighting of found blocks and text
* Navigate between matches with Previous/Next buttons
* Pasted text cleanup: fix double spaces, non-breaking spaces from Word, space before punctuation, space after an opening ¿ or ¡, straight quotes to Spanish « », and ellipsis, all with one click
* Missing opening marks: finds ? and ! without their ¿ or ¡ and lets you review and add each one before applying
* Searches every text attribute of a block, not just the first one found
* Toolbar icon in the editor header for quick access
* Also accessible from the editor's three-dot menu
* Keyboard shortcut: Ctrl+Alt+F (Cmd+Option+F on Mac), also listed in the editor keyboard shortcuts help
* Draggable floating panel
* Auto-focus on search field when opening the panel
* Accessible and screen reader friendly

**Supported Blocks:**

* Paragraph
* Heading
* List Item
* Quote
* Pullquote
* Verse
* Preformatted
* Code
* Table cells
* And any block with text content

**How to Use:**

1. Open any post or page in the block editor
2. Click the search icon in the top toolbar, press Ctrl+Alt+F (Cmd+Option+F on Mac), or select "Search & Replace" from the editor's three-dot menu
3. Enter your search term and click "Find"
4. Navigate between matches using the arrow buttons
5. Enter replacement text and click "Replace" or "Replace All"
6. Use the "Undo" button to revert changes if needed

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/search-replace-text-blocks/` or install through the WordPress plugins screen
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Open any post or page in the block editor and click the search icon in the toolbar to start

== Frequently Asked Questions ==

= How do I open the Search & Replace panel? =

There are three ways to open it:

1. Click the search icon (magnifying glass) in the editor's top toolbar
2. Press Ctrl+Alt+F (Cmd+Option+F on Mac)
3. Click "Search & Replace" in the editor's three-dot menu (⋮) at the top right

= Why did the keyboard shortcut change? =

WordPress 7.1 introduced its own Ctrl+Shift+H shortcut to show or hide the selected blocks, so the old one is no longer available to plugins. Since version 1.2.0 the panel opens with Ctrl+Alt+F (Cmd+Option+F on Mac). You will also find it listed in the editor own keyboard shortcuts help, under Global shortcuts.

= Can I undo replacements? =

Yes, use the built-in "Undo" button in the panel. It reverts the changes made by your last action (a replacement, a Replace All, a cleanup, or adding opening marks), not the entire session: run another action first if you need to go back further.

= Does it work with custom blocks? =

The plugin works with any block that stores text in standard attributes (content, text, value, citation, caption).

= Why doesn't it find text in some blocks? =

Some blocks store content differently or use nested structures. The plugin supports most common text blocks. If you find a block type that should be supported, please let us know.

== Screenshots ==

1. Search icon in the editor toolbar
2. Search & Replace floating panel
3. Visual highlighting of found text

== Changelog ==

= 1.3.0 =
New pasted text cleanup and missing opening marks (¿ ¡) tools, both reviewable before applying. Search and replace now scans every text attribute of a block. Undo also now reverts only your last action.

* New: Pasted text cleanup panel with one-click fixes for text pasted from Word or Google Docs: double spaces, non-breaking spaces, space before punctuation, space after an opening ¿ or ¡, straight quotes to Spanish « », and ellipsis.
* New: Missing opening marks panel finds ? and ! without their ¿ or ¡ and lets you review and add each one before applying.
* Improved: Search and replace now scans every text attribute of a block (for example a quote's citation and content), not just the first one found.
* Improved: Count messages use proper singular and plural forms instead of concatenation, so translations are not limited to a fixed word order.
* Improved: The panel footer now shows the actual keyboard shortcut for your platform.
* Fix: Undo now reverts only your last action. Before, undoing after a single replacement that followed a Replace All (or the new cleanup tools) could silently revert both at once.

For older changelog entries, please check the [changelog.txt](https://plugins.svn.wordpress.org/search-replace-text-blocks/trunk/changelog.txt) file

== Upgrade Notice ==

= 1.3.0 =
New pasted text cleanup and missing opening marks (¿ ¡) tools, both reviewable before applying. Search and replace now scans every text attribute of a block. Undo also now reverts only your last action.

== Support ==

= Need private support or custom development? =
Do you need one-on-one help, priority troubleshooting, or a custom feature, integration, or tweak built specifically for your site? I offer private support and custom development. Just [contact me](mailto:search-replace-text-blocks@ayudawp.com) and tell me what you need.

= Need help or have suggestions? =
* [Official website](https://servicios.ayudawp.com/)
* [WordPress support forum](https://wordpress.org/support/plugin/search-replace-text-blocks/)
* [YouTube channel](https://www.youtube.com/AyudaWordPressES)
* [Documentation and tutorials](https://ayudawp.com/)

**Love the plugin?** Please leave us a 5-star review and help spread the word!

== About AyudaWP ==

We are specialists in WordPress security, SEO, and performance optimization plugins. We create tools that solve real problems for WordPress site owners while maintaining the highest coding standards and accessibility requirements.