Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / editor / js / editor.es6.js
index 03c50d958ca8371feb711247c1f97e744e120fac..b87e9141fb62f28193153398558e55fa44feceb4 100644 (file)
    *   The text area DOM element, if it was found.
    */
   function findFieldForFormatSelector($formatSelector) {
-    const field_id = $formatSelector.attr('data-editor-for');
+    const fieldId = $formatSelector.attr('data-editor-for');
     // This selector will only find text areas in the top-level document. We do
     // not support attaching editors on text areas within iframes.
-    return $(`#${field_id}`).get(0);
+    return $(`#${fieldId}`).get(0);
   }
 
   /**
@@ -80,7 +80,7 @@
       const 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>`, {
+      const confirmationDialog = Drupal.dialog(`<div>${message}</div>`, {
         title: Drupal.t('Change text format?'),
         dialogClass: 'editor-change-text-format-modal',
         resizable: false,