Source: modules/ckeditor/tests/modules/js/ajax-css.es6.js

  1. /**
  2. * @file
  3. * Contains client-side code for testing CSS delivered to CKEditor via AJAX.
  4. */
  5. (function (Drupal, ckeditor, editorSettings, $) {
  6. Drupal.behaviors.ajaxCssForm = {
  7. attach(context) {
  8. // Initialize an inline CKEditor on the #edit-inline element if it
  9. // isn't editable already.
  10. $(context)
  11. .find('#edit-inline')
  12. .not('[contenteditable]')
  13. .each(function () {
  14. ckeditor.attachInlineEditor(this, editorSettings.formats.test_format);
  15. });
  16. },
  17. };
  18. })(Drupal, Drupal.editors.ckeditor, drupalSettings.editor, jQuery);