Unverified Commit fd30ec0b authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3285054 by lauriii, Wim Leers: Add ckeditor5-stylesheets: false to...

Issue #3285054 by lauriii, Wim Leers: Add ckeditor5-stylesheets: false to Claro and Olivero (and fix it)
parent 26c37570
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -641,7 +641,7 @@ function _ckeditor5_theme_css($theme = NULL): array {
  }
  if (isset($theme) && $theme_path = \Drupal::service('extension.list.theme')->getPath($theme)) {
    $info = \Drupal::service('extension.list.theme')->getExtensionInfo($theme);
    if (isset($info['ckeditor5-stylesheets'])) {
    if (isset($info['ckeditor5-stylesheets']) && $info['ckeditor5-stylesheets'] !== FALSE) {
      $css = $info['ckeditor5-stylesheets'];
      foreach ($css as $key => $url) {
        // CSS url is external or relative to Drupal root.
+6 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ function (ConstraintViolation $v) {
      'use text format llama',
      'administer themes',
      'view the administration theme',
      'administer filters',
    ]);
    $this->drupalLogin($this->adminUser);
  }
@@ -102,6 +103,11 @@ public function testCkeditorStylesheets() {
    $this->drupalGet('node/add/article');
    $assert_session->responseNotContains('test_ckeditor_stylesheets_relative/css/yokotsoko.css');

    // Confirm that the missing ckeditor5-stylesheets configuration can be
    // bypassed.
    $this->drupalGet('admin/config/content/formats/manage/llama');
    $assert_session->pageTextNotContains('ckeditor_stylesheets configured without a corresponding ckeditor5-stylesheets configuration.');

    // Install a theme with ckeditor5-stylesheets configured. Do this manually
    // to confirm `library_info` cache tags are invalidated.
    $this->drupalGet('admin/appearance');
+2 −0
Original line number Diff line number Diff line
@@ -173,6 +173,8 @@ ckeditor_stylesheets:
  - css/theme/ckeditor-frame.css
  - css/classy/components/media-embed-error.css

ckeditor5-stylesheets: false

regions:
  header: 'Header'
  pre_content: 'Pre-content'
+2 −0
Original line number Diff line number Diff line
@@ -90,3 +90,5 @@ ckeditor_stylesheets:
  - css/components/table.css
  - css/components/text-content.css
  - css/theme/ckeditor-frame.css

ckeditor5-stylesheets: false
+1 −0
Original line number Diff line number Diff line
@@ -100,3 +100,4 @@ regions_hidden:

ckeditor_stylesheets:
  - css/classy/components/media-embed-error.css
ckeditor5-stylesheets: false