Issue #3285054 by lauriii, Wim Leers: Add ckeditor5-stylesheets: false to Claro and Olivero (and fix it)

merge-requests/2712/head
bnjmnm 2022-08-31 11:22:32 -04:00
parent d2653f7342
commit a385888db2
4 changed files with 11 additions and 1 deletions

View File

@ -639,7 +639,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.

View File

@ -83,6 +83,7 @@ class AddedStylesheetsTest extends BrowserTestBase {
'use text format llama',
'administer themes',
'view the administration theme',
'administer filters',
]);
$this->drupalLogin($this->adminUser);
}
@ -102,6 +103,11 @@ class AddedStylesheetsTest extends BrowserTestBase {
$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');

View File

@ -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'

View File

@ -90,3 +90,5 @@ ckeditor_stylesheets:
- css/components/table.css
- css/components/text-content.css
- css/theme/ckeditor-frame.css
ckeditor5-stylesheets: false