diff --git a/core/modules/edit/edit.module b/core/modules/edit/edit.module
index e3beec0..8a57f67 100644
--- a/core/modules/edit/edit.module
+++ b/core/modules/edit/edit.module
@@ -145,7 +145,7 @@ function edit_library_info() {
 function edit_preprocess_field(&$variables) {
   $element = $variables['element'];
   $entity = $element['#object'];
-  $variables['attributes']['data-edit-id'] = $entity->entityType() . ':' . $entity->id() . ':' . $element['#field_name'] . ':' . $element['#language'] . ':' . $element['#view_mode'];
+  $variables['attributes']['data-edit-id'] = $entity->entityType() . ':' . $entity->id() . ':' . $element['#field_name'] . ':' . $element['#language'] . ':' . $element['#formatter'];
 }
 
 /**
diff --git a/core/modules/edit/lib/Drupal/edit/EditController.php b/core/modules/edit/lib/Drupal/edit/EditController.php
index 5d6f8ed..c3cb426 100644
--- a/core/modules/edit/lib/Drupal/edit/EditController.php
+++ b/core/modules/edit/lib/Drupal/edit/EditController.php
@@ -42,7 +42,7 @@ public function metadata(Request $request) {
 
     $metadata = array();
     foreach ($fields as $field) {
-      list($entity_type, $entity_id, $field_name, $langcode, $view_mode) = explode(':', $field);
+      list($entity_type, $entity_id, $field_name, $langcode, $formatter_id) = explode(':', $field);
 
       // Load the entity.
       if (!$entity_type || !entity_get_info($entity_type)) {
@@ -61,7 +61,7 @@ public function metadata(Request $request) {
         throw new NotFoundHttpException();
       }
 
-      $metadata[$field] = $metadataGenerator->generate($entity, $instance, $langcode, $view_mode);
+      $metadata[$field] = $metadataGenerator->generate($entity, $instance, $langcode, $formatter_id);
     }
 
     return new JsonResponse($metadata);
diff --git a/core/modules/edit/lib/Drupal/edit/MetadataGenerator.php b/core/modules/edit/lib/Drupal/edit/MetadataGenerator.php
index bdbdf10..f355fb5 100644
--- a/core/modules/edit/lib/Drupal/edit/MetadataGenerator.php
+++ b/core/modules/edit/lib/Drupal/edit/MetadataGenerator.php
@@ -48,7 +48,7 @@ public function __construct(EditEntityFieldAccessCheckInterface $access_checker,
   /**
    * Implements \Drupal\edit\MetadataGeneratorInterface::generate().
    */
-  public function generate(EntityInterface $entity, FieldInstance $instance, $langcode, $view_mode) {
+  public function generate(EntityInterface $entity, FieldInstance $instance, $langcode, $formatter_id) {
     $field_name = $instance['field_name'];
 
     // Early-return if user does not have access.
@@ -58,7 +58,6 @@ public function generate(EntityInterface $entity, FieldInstance $instance, $lang
     }
 
     $label = $instance['label'];
-    $formatter_id = $instance->getFormatter($view_mode)->getPluginId();
     $items = $entity->get($field_name);
     $items = $items[$langcode];
     $editor = $this->editorSelector->getEditor($formatter_id, $instance, $items);
diff --git a/core/modules/edit/lib/Drupal/edit/MetadataGeneratorInterface.php b/core/modules/edit/lib/Drupal/edit/MetadataGeneratorInterface.php
index 9e4fb5d..717ef38 100644
--- a/core/modules/edit/lib/Drupal/edit/MetadataGeneratorInterface.php
+++ b/core/modules/edit/lib/Drupal/edit/MetadataGeneratorInterface.php
@@ -24,8 +24,8 @@
    *   The field instance of the field being edited.
    * @param string $langcode
    *   The name of the language for which the field is being edited.
-   * @param string $view_mode
-   *   The view mode the field should be rerendered in.
+   * @param string $formatter_id
+   *   The plugin_id of the formatter used to render the field.
    * @return array
    *   An array containing metadata with the following keys:
    *   - label: the user-visible label for the field.
