Skip to main content

Searching Full Text in Formatted Text Fields

Date
2023-10-25
Client
Amon Carter

Typically when dealing with migrations, and recently in CKEditor 4 to 5 upgrades with Drupal, I need to look for specific text strings that also include html. It could be a data attribute, specific class name, etc. These are not going to be picked up in a normal site search. It usually takes me 5 to 10 minutes to get a SQL query going and at this point I understand the DB structure well enough to keep it fast, but its annoying, and only for 1 field. We have text fields all over the site. So I created a little tool to help.

Recently on a project tackling the CKEditor upgrade, I needed to find some specific classes which indicated how often certain plugins were used. Two plugins I quickly realized the client didn't really use and after discussion with them, we decided to cut them from the upgrade.

Another benefit to the tool is now for a more tech-savy client, they can use it too, instead of asking us.

Here is a few example searches:

%<a name="%"></a>%
%<a id="%"></a>%
%<a id="%" name="%"></a>%
%class="material-icons"%

Related Tech