Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / ckeditor / js / ckeditor.stylescombo.admin.es6.js
index 9fd145e711670bf0195bbf34fd6f911cb46ec63e..bfc0fda39816e2b093acc01b321a0595465b97a6 100644 (file)
@@ -3,7 +3,7 @@
  * CKEditor StylesCombo admin behavior.
  */
 
-(function ($, Drupal, drupalSettings, _) {
+(function($, Drupal, drupalSettings, _) {
   /**
    * Ensures that the "stylescombo" button's metadata remains up-to-date.
    *
       const $ckeditorActiveToolbar = $context
         .find('.ckeditor-toolbar-configuration')
         .find('.ckeditor-toolbar-active');
-      let previousStylesSet = drupalSettings.ckeditor.hiddenCKEditorConfig.stylesSet;
+      let previousStylesSet =
+        drupalSettings.ckeditor.hiddenCKEditorConfig.stylesSet;
       const that = this;
-      $context.find('[name="editor[settings][plugins][stylescombo][styles]"]')
-        .on('blur.ckeditorStylesComboSettings', function () {
+      $context
+        .find('[name="editor[settings][plugins][stylescombo][styles]"]')
+        .on('blur.ckeditorStylesComboSettings', function() {
           const styles = $.trim($(this).val());
           const stylesSet = that._generateStylesSetSetting(styles);
           if (!_.isEqual(previousStylesSet, stylesSet)) {
         }
 
         // Validate syntax: element[.class...]|label pattern expected.
-        if (style.match(/^ *[a-zA-Z0-9]+ *(\.[a-zA-Z0-9_-]+ *)*\| *.+ *$/) === null) {
+        if (
+          style.match(/^ *[a-zA-Z0-9]+ *(\.[a-zA-Z0-9_-]+ *)*\| *.+ *$/) ===
+          null
+        ) {
           // Instead of failing, we just ignore any invalid styles.
           continue;
         }
    */
   Drupal.behaviors.ckeditorStylesComboSettingsSummary = {
     attach() {
-      $('[data-ckeditor-plugin-id="stylescombo"]').drupalSetSummary((context) => {
-        const styles = $.trim($('[data-drupal-selector="edit-editor-settings-plugins-stylescombo-styles"]').val());
+      $('[data-ckeditor-plugin-id="stylescombo"]').drupalSetSummary(context => {
+        const styles = $.trim(
+          $(
+            '[data-drupal-selector="edit-editor-settings-plugins-stylescombo-styles"]',
+          ).val(),
+        );
         if (styles.length === 0) {
           return Drupal.t('No styles configured');
         }
       });
     },
   };
-}(jQuery, Drupal, drupalSettings, _));
+})(jQuery, Drupal, drupalSettings, _);