Commit 14c41316 authored by catch's avatar catch
Browse files

Issue #3271094 by Wim Leers, lauriii, xjm, catch: Move Media CKEditor 4 integration into CKEditor

(cherry picked from commit 0becafaf)
parent f0f06c5f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -477,7 +477,7 @@
  "ignoreFiles": [
    "assets/vendor/**/*.css",
    "tests/Drupal/Tests/Core/Asset/css_test_files/**/*.css",
    "modules/media/css/plugins/drupalmedia/ckeditor.drupalmedia.css",
    "modules/ckeditor/css/plugins/drupalmedia/ckeditor.drupalmedia.css",
    "themes/stable/css/core/assets/vendor/**/*.css",
    "themes/stable9/css/core/assets/vendor/**/*.css",
    "themes/stable9/css/media/plugins/drupalmedia/ckeditor.drupalmedia.css"
+7 −0
Original line number Diff line number Diff line
@@ -90,3 +90,10 @@ drupal.ckeditor.language.admin:
    - core/jquery
    - core/drupal
    - core/drupal.vertical-tabs

drupal.ckeditor.plugins.drupalmedia:
  version: VERSION
  js:
    js/ckeditor.drupalmedia.theme.js: {}
  dependencies:
    - core/drupal
+17 −0
Original line number Diff line number Diff line
/**
 * @file
 * Theme elements for the Media Embed CKEditor plugin.
 */

((Drupal) => {
  /**
   * Themes the edit button for a media embed.
   *
   * @return {string}
   *   An HTML string to insert in the CKEditor.
   */
  Drupal.theme.mediaEmbedEditButton = () =>
    `<button class="media-library-item__edit">${Drupal.t(
      'Edit media',
    )}</button>`;
})(Drupal);
+10 −0
Original line number Diff line number Diff line
@@ -6,5 +6,5 @@
**/

(Drupal => {
  Drupal.theme.mediaEmbedPreviewError = () => `<div>${Drupal.t('An error occurred while trying to preview the media. Please save your work and reload this page.')}</div>`;
  Drupal.theme.mediaEmbedEditButton = () => `<button class="media-library-item__edit">${Drupal.t('Edit media')}</button>`;
})(Drupal);
 No newline at end of file
Loading