Get all the text fields type and alter value after save
Another approach by checking field name. I think this will get you the "custom" field part, but not the "all" fields part:

MYMODULE.module:

use Drupal\Core\Entity\EntityInterface;

function MYMODULE_node_presave(EntityInterface $entity) {
  if ($entity-&gt;hasField('field_name')) {
    $entity-&gt;get('field_name')-&gt;value = preg_replace(
      $toReplace,
      $newText,
      $entity-&gt;get('field_name')-&gt;value
    );
  }
}


But this only checks for fields of that name. I am also looking for a way to alter the value of a ckeditor/text field by testing field type instead of field name.

I would have hoped setting the field name value to something like text_long would have worked. This is a base field hook suggestion, but I am not having any luck at this time.

To add to the use case, it would be nice to alter ckeditor/text fields whether attached directly to the node, or via a Paragraph type.

The answer in the comment link above is helpful, but I have not succeeded in implementation.