title: How to manipulate value before node is saved in Drupal 8?
body: <p>I have an editing node form. When user enters new value and clicks on submit to edit the node, I first want to get the old node back, manipulate the value and then just save/update the node.</p>
  
  <p>Below is my solution, but it does not work.</p>
  
  <pre><code>function custom_module_form_node_form_alter(&amp;$form, FormStateInterface $form_state) {
      $editing_entity = $form_state-&gt;getFormObject()-&gt;getEntity();
  
      if (!$editing_entity-&gt;isNew()) {
          $form['actions']['submit']['#submit'][] = 'custom_module_node_form_submit';
      }
  }
  
  function custom_module_node_form_submit($form, FormStateInterface $form_state) {
     $editing_entity = $form_state-&gt;getFormObject()-&gt;getEntity();
  
     $entity = Drupal::entityTypeManager()-&gt;getStorage('node')-&gt;load($editing_entity-&gt;id());
  }
  </code></pre>
  
  <p>In the form_submit hook, I tried to get the old node back but it is already too late and the node is already updated/saved. How can I get the old node back and manipulate the value before updating/saving the node in Drupal 8?</p>