Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / ckeditor / tests / modules / js / ajax-css.es6.js
diff --git a/web/core/modules/ckeditor/tests/modules/js/ajax-css.es6.js b/web/core/modules/ckeditor/tests/modules/js/ajax-css.es6.js
new file mode 100644 (file)
index 0000000..af97a3b
--- /dev/null
@@ -0,0 +1,20 @@
+/**
+ * @file
+ * Contains client-side code for testing CSS delivered to CKEditor via AJAX.
+ */
+
+(function (Drupal, ckeditor, editorSettings, $) {
+  Drupal.behaviors.ajaxCssForm = {
+
+    attach(context) {
+      // Initialize an inline CKEditor on the #edit-inline element if it
+      // isn't editable already.
+      $(context)
+        .find('#edit-inline')
+        .not('[contenteditable]')
+        .each(function () {
+          ckeditor.attachInlineEditor(this, editorSettings.formats.test_format);
+        });
+    },
+  };
+}(Drupal, Drupal.editors.ckeditor, drupalSettings.editor, jQuery));