Commit e13e5efe authored by catch's avatar catch
Browse files

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

parent ca895b65
Loading
Loading
Loading
Loading
+1 −1
Changes for core/.stylelintrc.json: 1 added line, 1 removed line.
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
Changes for core/modules/ckeditor/ckeditor.libraries.yml: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -92,3 +92,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
Changes for core/modules/ckeditor/js/ckeditor.drupalmedia.theme.es6.js: 17 added lines, 0 removed lines.
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);
+2 −2
Changes for core/modules/ckeditor/js/ckeditor.drupalmedia.theme.js: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
**/

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