diff --git a/core/modules/editor/js/editor.js b/core/modules/editor/js/editor.js
index 6448953f19..aa97dd8c2e 100644
--- a/core/modules/editor/js/editor.js
+++ b/core/modules/editor/js/editor.js
@@ -8,8 +8,11 @@
 (function ($, Drupal, drupalSettings) {
   function findFieldForFormatSelector($formatSelector) {
     var fieldId = $formatSelector.attr('data-editor-for');
-
-    return $('#' + fieldId).get(0);
+    var fieldIds = fieldId.split(/\s*,\s*/);
+    fieldIds.forEach(function(part, index) {
+      this[index] = '#' + this[index];
+    }, fieldIds);
+    return $(fieldIds.join());
   }
 
   function filterXssWhenSwitching(field, format, originalFormatID, callback) {
@@ -54,55 +57,57 @@
   function onTextFormatChange(event) {
     var $select = $(event.target);
     var field = event.data.field;
-    var activeFormatID = field.getAttribute('data-editor-active-text-format');
-    var newFormatID = $select.val();
+    field.each(function(){
+      var activeFormatID = this.getAttribute('data-editor-active-text-format');
+      var newFormatID = $select.val();
 
-    if (newFormatID === activeFormatID) {
-      return;
-    }
+      if (newFormatID === activeFormatID) {
+        return;
+      }
 
-    var supportContentFiltering = drupalSettings.editor.formats[newFormatID] && drupalSettings.editor.formats[newFormatID].editorSupportsContentFiltering;
+      var supportContentFiltering = drupalSettings.editor.formats[newFormatID] && drupalSettings.editor.formats[newFormatID].editorSupportsContentFiltering;
 
-    var hasContent = field.value !== '';
-    if (hasContent && supportContentFiltering) {
-      var message = Drupal.t('Changing the text format to %text_format will permanently remove content that is not allowed in that text format.<br><br>Save your changes before switching the text format to avoid losing data.', {
-        '%text_format': $select.find('option:selected').text()
-      });
-      var confirmationDialog = Drupal.dialog('<div>' + message + '</div>', {
-        title: Drupal.t('Change text format?'),
-        dialogClass: 'editor-change-text-format-modal',
-        resizable: false,
-        buttons: [{
-          text: Drupal.t('Continue'),
-          class: 'button button--primary',
-          click: function click() {
-            changeTextEditor(field, newFormatID);
-            confirmationDialog.close();
-          }
-        }, {
-          text: Drupal.t('Cancel'),
-          class: 'button',
-          click: function click() {
-            $select.val(activeFormatID);
-            confirmationDialog.close();
-          }
-        }],
+      var hasContent = this.value !== '';
+      if (hasContent && supportContentFiltering) {
+        var message = Drupal.t('Changing the text format to %text_format will permanently remove content that is not allowed in that text format.<br><br>Save your changes before switching the text format to avoid losing data.', {
+          '%text_format': $select.find('option:selected').text()
+        });
+        var confirmationDialog = Drupal.dialog('<div>' + message + '</div>', {
+          title: Drupal.t('Change text format?'),
+          dialogClass: 'editor-change-text-format-modal',
+          resizable: false,
+          buttons: [{
+            text: Drupal.t('Continue'),
+            class: 'button button--primary',
+            click: function click() {
+              changeTextEditor(this, newFormatID);
+              confirmationDialog.close();
+            }
+          }, {
+            text: Drupal.t('Cancel'),
+            class: 'button',
+            click: function click() {
+              $select.val(activeFormatID);
+              confirmationDialog.close();
+            }
+          }],
 
-        closeOnEscape: false,
-        create: function create() {
-          $(this).parent().find('.ui-dialog-titlebar-close').remove();
-        },
+          closeOnEscape: false,
+          create: function create() {
+            $(this).parent().find('.ui-dialog-titlebar-close').remove();
+          },
 
-        beforeClose: false,
-        close: function close(event) {
-          $(event.target).remove();
-        }
-      });
+          beforeClose: false,
+          close: function close(event) {
+            $(event.target).remove();
+          }
+        });
 
-      confirmationDialog.showModal();
-    } else {
-      changeTextEditor(field, newFormatID);
-    }
+        confirmationDialog.showModal();
+      } else {
+        changeTextEditor(this, newFormatID);
+      }
+    });
   }
 
   Drupal.editors = {};
@@ -122,14 +127,18 @@
         }
 
         var activeFormatID = $this.val();
-        field.setAttribute('data-editor-active-text-format', activeFormatID);
+        field.each(function (){
+          this.setAttribute('data-editor-active-text-format', activeFormatID);
+        });
 
         if (settings.editor.formats[activeFormatID]) {
           Drupal.editorAttach(field, settings.editor.formats[activeFormatID]);
         }
 
         $(field).on('change.editor keypress.editor', function () {
-          field.setAttribute('data-editor-value-is-changed', 'true');
+          field.each(function (){
+            this.setAttribute('data-editor-value-is-changed', 'true');
+          });
 
           $(field).off('.editor');
         });
@@ -144,7 +153,9 @@
           }
 
           if (settings.editor.formats[activeFormatID]) {
-            Drupal.editorDetach(field, settings.editor.formats[activeFormatID], 'serialize');
+            field.each(function(){
+              Drupal.editorDetach(this, settings.editor.formats[activeFormatID], 'serialize');
+            });
           }
         });
       });
@@ -163,7 +174,9 @@
         var activeFormatID = $this.val();
         var field = findFieldForFormatSelector($this);
         if (field && activeFormatID in settings.editor.formats) {
-          Drupal.editorDetach(field, settings.editor.formats[activeFormatID], trigger);
+          field.each(function(){
+            Drupal.editorDetach(this, settings.editor.formats[activeFormatID], trigger);
+          });
         }
       });
     }
@@ -171,12 +184,19 @@
 
   Drupal.editorAttach = function (field, format) {
     if (format.editor) {
-      Drupal.editors[format.editor].attach(field, format);
+      field.each(function() {
+        // We need this to make a closure variable to use within onChange event handler below.
+        var $field = $(this);
 
-      Drupal.editors[format.editor].onChange(field, function () {
-        $(field).trigger('formUpdated');
+        Drupal.editors[format.editor].attach(this, format);
 
-        field.setAttribute('data-editor-value-is-changed', 'true');
+        Drupal.editors[format.editor].onChange(this, function () {
+          // We can't use this pointer here.
+          // Alway use $field closure variable.
+          $field.trigger('formUpdated');
+
+          $field[0].setAttribute('data-editor-value-is-changed', 'true');
+        });
       });
     }
   };
diff --git a/core/modules/editor/src/Element.php b/core/modules/editor/src/Element.php
index 9f8ab91614..1264af7438 100644
--- a/core/modules/editor/src/Element.php
+++ b/core/modules/editor/src/Element.php
@@ -59,8 +59,13 @@ public function preRenderTextFormat(array $element) {
       return $element;
     }
 
+    $field_ids = [$element['value']['#id']];
+
+    if (isset($element['summary'])) {
+      $field_ids[] = $element['summary']['#id'];
+    }
+
     // Use a hidden element for a single text format.
-    $field_id = $element['value']['#id'];
     if (!$element['format']['format']['#access']) {
       // Use the first (and only) available text format.
       $format_id = $format_ids[0];
@@ -69,14 +74,14 @@ public function preRenderTextFormat(array $element) {
         '#name' => $element['format']['format']['#name'],
         '#value' => $format_id,
         '#attributes' => [
-          'data-editor-for' => $field_id,
+          'data-editor-for' => implode(',', $field_ids),
         ],
       ];
     }
     // Otherwise, attach to text format selector.
     else {
       $element['format']['format']['#attributes']['class'][] = 'editor';
-      $element['format']['format']['#attributes']['data-editor-for'] = $field_id;
+      $element['format']['format']['#attributes']['data-editor-for'] = implode(',', $field_ids);
     }
 
     // Hide the text format's filters' guidelines of those text formats that have
