diff --git a/core/modules/ckeditor5/ckeditor5.libraries.yml b/core/modules/ckeditor5/ckeditor5.libraries.yml index 21e2af573de2373b8fff9a6253ef0cc46f0d1b54..53554f8cbc1c3e9fcd7d6462f972b284a676d1e8 100644 --- a/core/modules/ckeditor5/ckeditor5.libraries.yml +++ b/core/modules/ckeditor5/ckeditor5.libraries.yml @@ -37,12 +37,6 @@ drupal.ckeditor5.stylesheets: version: VERSION css: [] -drupal.ckeditor5.quickedit-temporary-work-around: - deprecated: "Temporary work-around until https://www.drupal.org/project/drupal/issues/3196689 lands." - css: - theme: - css/quickedit-override.css: {} - drupal.ckeditor5.codeBlock: dependencies: - core/ckeditor5.codeBlock diff --git a/core/modules/ckeditor5/ckeditor5.module b/core/modules/ckeditor5/ckeditor5.module index 1120649b2d4fa2d2818dcf6ca48e9fe83777d2d8..e93fb5dd51057e166194fb48c1a49d60319a6fc3 100644 --- a/core/modules/ckeditor5/ckeditor5.module +++ b/core/modules/ckeditor5/ckeditor5.module @@ -434,10 +434,6 @@ function ckeditor5_library_info_alter(&$libraries, $extension) { 'theme' => array_fill_keys(array_values($css), []), ], ]; - - if ($moduleHandler->moduleExists('quickedit')) { - $libraries['drupal.ckeditor5']['dependencies'][] = 'ckeditor5/drupal.ckeditor5.quickedit-temporary-work-around'; - } } if ($extension === 'core') { diff --git a/core/modules/ckeditor5/css/quickedit-override.css b/core/modules/quickedit/css/editors/formattedText/ckeditor5.workaround.css similarity index 100% rename from core/modules/ckeditor5/css/quickedit-override.css rename to core/modules/quickedit/css/editors/formattedText/ckeditor5.workaround.css diff --git a/core/modules/quickedit/quickedit.libraries.yml b/core/modules/quickedit/quickedit.libraries.yml index c6ead41d328d783755a4d6a484fdff8f396cb669..84df03a98513c195c9c49e63228fde1fd19e4fd2 100644 --- a/core/modules/quickedit/quickedit.libraries.yml +++ b/core/modules/quickedit/quickedit.libraries.yml @@ -48,6 +48,12 @@ quickedit.inPlaceEditor.form: dependencies: - quickedit/quickedit +quickedit.ckeditor5-temporary-work-around: + # "Temporary work-around until https://www.drupal.org/project/drupal/issues/3196689 lands." + css: + theme: + css/editors/formattedText/ckeditor5.workaround.css: { } + quickedit.inPlaceEditor.formattedText: version: VERSION css: diff --git a/core/modules/quickedit/quickedit.module b/core/modules/quickedit/quickedit.module index d571c667a7a6a656b566c1302b61c824545cae8d..01bcc1e2ae0d2d36b137483a58b8c0b2c9581cc7 100644 --- a/core/modules/quickedit/quickedit.module +++ b/core/modules/quickedit/quickedit.module @@ -101,6 +101,11 @@ function quickedit_library_info_alter(&$libraries, $extension) { $alter_library($libraries['quickedit'], $theme); } + + $moduleHandler = \Drupal::moduleHandler(); + if ($moduleHandler->moduleExists('ckeditor5')) { + $libraries['drupal.ckeditor5']['dependencies'][] = 'quickedit/quickedit.ckeditor5-temporary-work-around'; + } } /** diff --git a/core/modules/ckeditor5/tests/src/Functional/CKEditor5QuickEditLibraryTest.php b/core/modules/quickedit/tests/src/Functional/CKEditor5/CKEditor5QuickEditLibraryTest.php similarity index 89% rename from core/modules/ckeditor5/tests/src/Functional/CKEditor5QuickEditLibraryTest.php rename to core/modules/quickedit/tests/src/Functional/CKEditor5/CKEditor5QuickEditLibraryTest.php index 513f6af515c0879665922be2cd3dda64246d1757..d5e59343f26dfadfc654db601340f834d4512723 100644 --- a/core/modules/ckeditor5/tests/src/Functional/CKEditor5QuickEditLibraryTest.php +++ b/core/modules/quickedit/tests/src/Functional/CKEditor5/CKEditor5QuickEditLibraryTest.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\Tests\ckeditor5\Functional; +namespace Drupal\Tests\quickedit\Functional\CKEditor5; use Drupal\ckeditor5\Plugin\Editor\CKEditor5; use Drupal\editor\Entity\Editor; @@ -14,6 +14,7 @@ * Tests that a Quick Edit specific library loads when Quick Edit is enabled. * * @group ckeditor5 + * @group quickedit * @group legacy */ class CKEditor5QuickEditLibraryTest extends BrowserTestBase { @@ -85,11 +86,8 @@ function (ConstraintViolation $v) { */ public function testQuickeditTemporaryWorkaround() { $assert_session = $this->assertSession(); - - $this->expectDeprecation('Temporary work-around until https://www.drupal.org/project/drupal/issues/3196689 lands.'); - $this->drupalGet('node/add/article'); - $assert_session->responseContains('css/quickedit-override.css'); + $assert_session->responseContains('css/editors/formattedText/ckeditor5.workaround.css'); } } diff --git a/core/modules/quickedit/tests/src/Functional/CKEditor5/CKEditor5QuickEditLibraryTest.php.orig b/core/modules/quickedit/tests/src/Functional/CKEditor5/CKEditor5QuickEditLibraryTest.php.orig new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/core/themes/stable/css/quickedit/editors/formattedText/ckeditor5.workaround.css b/core/themes/stable/css/quickedit/editors/formattedText/ckeditor5.workaround.css new file mode 100644 index 0000000000000000000000000000000000000000..e64eb0d03cf14d1f076da38d2ec8cf26e163aaa6 --- /dev/null +++ b/core/themes/stable/css/quickedit/editors/formattedText/ckeditor5.workaround.css @@ -0,0 +1,9 @@ +.quickedit-editable, +.quickedit-editing.ck.ck-editor__editable_inline { + top: inherit !important; + left: inherit !important; + margin-bottom: inherit !important; +} +.quickedit-editing.ck.ck-editor__editable_inline > :first-child { + margin-top: inherit; +} diff --git a/core/themes/stable/stable.info.yml b/core/themes/stable/stable.info.yml index 687f253197027be965a282df8978952b16b10851..50c618910547dbbddd4c1913b6963210e36f3818 100644 --- a/core/themes/stable/stable.info.yml +++ b/core/themes/stable/stable.info.yml @@ -199,6 +199,11 @@ libraries-override: css/editors/image.css: css/quickedit/editors/image.css theme: css/editors/image.theme.css: css/quickedit/editors/image.theme.css + quickedit/quickedit.ckeditor5-temporary-work-around: + # "Temporary work-around until https://www.drupal.org/project/drupal/issues/3196689 lands." + css: + theme: + css/editors/formattedText/ckeditor5.workaround.css: css/quickedit/editors/formattedText/ckeditor5.workaround.css settings_tray/drupal.settings_tray: css: diff --git a/core/themes/stable9/css/quickedit/editors/formattedText/ckeditor5.workaround.css b/core/themes/stable9/css/quickedit/editors/formattedText/ckeditor5.workaround.css new file mode 100644 index 0000000000000000000000000000000000000000..e64eb0d03cf14d1f076da38d2ec8cf26e163aaa6 --- /dev/null +++ b/core/themes/stable9/css/quickedit/editors/formattedText/ckeditor5.workaround.css @@ -0,0 +1,9 @@ +.quickedit-editable, +.quickedit-editing.ck.ck-editor__editable_inline { + top: inherit !important; + left: inherit !important; + margin-bottom: inherit !important; +} +.quickedit-editing.ck.ck-editor__editable_inline > :first-child { + margin-top: inherit; +} diff --git a/core/themes/stable9/stable9.info.yml b/core/themes/stable9/stable9.info.yml index dfd3849acd85d57f02d99964f4683504bcb41397..dc7ba753308a7d6a24b226f885f4f03339fcb682 100644 --- a/core/themes/stable9/stable9.info.yml +++ b/core/themes/stable9/stable9.info.yml @@ -219,6 +219,11 @@ libraries-override: css/editors/image.css: css/quickedit/editors/image.css theme: css/editors/image.theme.css: css/quickedit/editors/image.theme.css + quickedit/quickedit.ckeditor5-temporary-work-around: + # "Temporary work-around until https://www.drupal.org/project/drupal/issues/3196689 lands." + css: + theme: + css/editors/formattedText/ckeditor5.workaround.css: css/quickedit/editors/formattedText/ckeditor5.workaround.css settings_tray/drupal.settings_tray: css: