How to Replace Value of CKEditor Field via Custom Module
I have had some success.

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 = $newValue;
  }
}