diff --git a/core/modules/ckeditor5/ckeditor5.ckeditor5.yml b/core/modules/ckeditor5/ckeditor5.ckeditor5.yml index 2a2c3fd1658..612dac06581 100644 --- a/core/modules/ckeditor5/ckeditor5.ckeditor5.yml +++ b/core/modules/ckeditor5/ckeditor5.ckeditor5.yml @@ -394,11 +394,8 @@ ckeditor5_list: plugins: - list.List - list.ListProperties - config: - list: - properties: - # @todo Make this configurable in https://www.drupal.org/project/drupal/issues/3274635 - styles: false + # @see \Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin::getDynamicPluginConfig() + config: {} drupal: label: List library: core/ckeditor5.list @@ -414,6 +411,8 @@ ckeditor5_list: -
- '; + protected $defaultElementsAfterUpdatingToCkeditor5 = '
- '; /** * Test enabling CKEditor 5 in a way that triggers validation. diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php index ea5a43b7e21..7ac64038b38 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php @@ -639,13 +639,14 @@ public function testListPlugin(): void { 'editor' => 'ckeditor5', 'settings' => [ 'toolbar' => [ - 'items' => ['sourceEditing', 'numberedList'], + 'items' => ['sourceEditing', 'numberedList', 'bulletedList'], ], 'plugins' => [ 'ckeditor5_list' => [ 'properties' => [ 'reversed' => FALSE, 'startIndex' => FALSE, + 'styles' => FALSE, ], 'multiBlock' => TRUE, ], @@ -678,7 +679,7 @@ function (ConstraintViolation $v) { $numbered_list_dropdown_selector = '.ck-splitbutton__arrow'; // Check that there is no dropdown available for the numbered list because - // both reversed and startIndex are FALSE. + // reversed, startIndex and styles are FALSE. $assert_session->elementNotExists('css', $numbered_list_dropdown_selector); // Save content so source content is kept after changing the editor config. $page->pressButton('Save'); @@ -713,6 +714,70 @@ function (ConstraintViolation $v) { $assert_session->elementExists('css', $reversed_order_button_selector); $assert_session->elementTextEquals('css', $reversed_order_button_selector, 'Reversed order'); $assert_session->elementExists('css', $start_index_element_selector); + + // Enable list style types. + $editor = Editor::load('test_format'); + $settings = $editor->getSettings(); + $settings['plugins']['ckeditor5_list']['properties']['styles'] = TRUE; + $editor->setSettings($settings); + $editor->save(); + $this->getSession()->reload(); + $this->waitForEditor(); + + $list_types = [ + 'ol' => [ + 'Lower-roman' => 'i', + 'Upper-roman' => 'I', + 'Lower-latin' => 'a', + 'Upper-latin' => 'A', + ], + 'ul' => [ + 'Square' => 'square', + 'Disc' => 'disc', + 'Circle' => 'circle', + ], + ]; + + foreach ($list_types as $list_tag => $types) { + foreach ($types as $type => $type_attribute) { + $list_to_edit = $assert_session->waitForElementVisible('css', ".ck-editor__editable_inline > *:first-child"); + $list_to_edit->click(); + + // Open the list type toolbar and choose a type. + $list_button_tip_text = $list_tag === 'ol' ? 'Numbered List' : 'Bulleted List'; + $toolbar_selector = '[aria-label="' . str_replace(' L', ' l', $list_button_tip_text) . ' styles toolbar"]'; + $button_selector = '[data-cke-tooltip-text="' . $list_button_tip_text . '"]'; + $page->find('css', '[aria-expanded="false"]' . $button_selector)->click(); + $open_splitbutton = $assert_session->waitForElementVisible('css', '[aria-expanded="true"]' . $button_selector); + $this->assertNotNull($open_splitbutton, "$list_button_tip_text splitbutton is open"); + $toolbar = $assert_session->waitForElementVisible('css', $toolbar_selector); + $this->assertNotNull($toolbar, "Toolbar for selecting $type is available at $toolbar_selector "); + $toolbar_with_tips = $assert_session->waitForElementVisible('css', $toolbar_selector . ' [data-cke-tooltip-text]'); + $this->assertNotNull($toolbar_with_tips); + $toolbar_buttons = $toolbar->findAll('css', 'button'); + // While this is a bit of an indirect way to find the correct button, it + // accounts for the mixed dash characters and worked better than other + // attempts. + $toolbar_button_tips = array_map(fn($item) => str_replace('–', '-', $item->getAttribute('data-cke-tooltip-text')), $toolbar_buttons); + $this->assertNotFalse(array_search($type, $toolbar_button_tips)); + $toolbar_buttons[array_search($type, $toolbar_button_tips)]->click(); + $widget_selector = '.ck-editor__editable_inline > ' . $list_tag . '[type="' . $type_attribute . '"]'; + $widget = $assert_session->waitForElementVisible('css', $widget_selector); + $this->assertNotNull($widget, "The widget exists at $widget_selector"); + + // Confirm the style applied in-editor is for the type of list chosen. + $list_style_type = $this->getSession()->evaluateScript('window.getComputedStyle(document.querySelector(\'' . $widget_selector . '\')).listStyleType'); + $this->assertSame(str_replace('latin', 'alpha', strtolower($type)), $list_style_type, "The $list_style_type list should have the correct style."); + $page->pressButton('Save'); + + $fe_list_style_type = $this->getSession()->evaluateScript('window.getComputedStyle(document.querySelector(\'' . $list_tag . '[type]\')).listStyleType'); + // Confirm the style applied on the default theme is for the type of + // list chosen. + $this->assertSame(str_replace('latin', 'alpha', strtolower($type)), strtolower($fe_list_style_type)); + $this->drupalGet($edit_url); + $this->waitForEditor(); + } + } } /** diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php index 7f383ccb05d..19513aed7c4 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php @@ -98,6 +98,7 @@ protected function testMediaSplitList(): void { 'properties' => [ 'reversed' => FALSE, 'startIndex' => FALSE, + 'styles' => FALSE, ], 'multiBlock' => TRUE, ]; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php index 2f9d70884be..d7c1e4ba52b 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php @@ -230,39 +230,6 @@ protected function providerAllowingExtraAttributes(): array { // Edge case: `style`. // @todo https://www.drupal.org/project/drupal/issues/3304832 - - // Edge case: `type` attribute on lists. - // @todo Remove in https://www.drupal.org/project/drupal/issues/3274635. - 'no numberedList-related additions to the Source Editing configuration' => [ - '
', - '
- foo
- bar
', - '', - ], - '
- foo
- bar
' => [ - '
', - '
- foo
- bar
', - '
- foo
- bar
', - ], - '
' => [ - '
', - '
- foo
- bar
', - '
- foo
- bar
', - ], - 'no bulletedList-related additions to the Source Editing configuration' => [ - '
', - '
- foo
- bar
', - '', - ], - '
- foo
- bar
' => [ - '
', - '
- foo
- bar
', - '
- foo
- bar
', - ], - '
' => [ - '
', - '
- foo
- bar
', - '
- foo
- bar
', - ], ]; } diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTestBase.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTestBase.php index c14b6805044..219422feb38 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTestBase.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTestBase.php @@ -87,6 +87,7 @@ protected function setUp(): void { 'properties' => [ 'reversed' => FALSE, 'startIndex' => FALSE, + 'styles' => FALSE, ], 'multiBlock' => TRUE, ], diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php index 67d33b3726b..21798c3f7bc 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php @@ -190,6 +190,7 @@ public function testStyleFunctionality(): void { 'properties' => [ 'reversed' => FALSE, 'startIndex' => FALSE, + 'styles' => FALSE, ], 'multiBlock' => TRUE, ], diff --git a/core/modules/ckeditor5/tests/src/Kernel/ConfigurablePluginTest.php b/core/modules/ckeditor5/tests/src/Kernel/ConfigurablePluginTest.php index 16d571cf980..976e388f3ea 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/ConfigurablePluginTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/ConfigurablePluginTest.php @@ -94,6 +94,7 @@ public function testDefaults(): void { 'properties' => [ 'reversed' => TRUE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], diff --git a/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php b/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php index 9856407b12a..4abcfa8b566 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php @@ -695,6 +695,7 @@ public static function provider() { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -707,8 +708,6 @@ public static function provider() { '', '', '
', - '', - '
', '
', '
', '
', @@ -734,12 +733,12 @@ public static function provider() { [ 'expected_db_logs' => [ 'status' => [ - 'As part of migrating to CKEditor 5, it was found that the Basic HTML text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the Basic HTML text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', ], ], 'expected_messages' => [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', ], ], ] @@ -762,12 +761,12 @@ public static function provider() { ], 'expected_db_logs' => [ 'status' => [ - 'As part of migrating to CKEditor 5, it was found that the Basic HTML text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-caption>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the Basic HTML text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-caption>. The text format must be saved to make these changes active.', ], ], 'expected_messages' => [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-caption>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-caption>. Additional details are available in your logs.', ], ], ]); @@ -789,12 +788,12 @@ public static function provider() { ], 'expected_db_logs' => [ 'status' => [ - 'As part of migrating to CKEditor 5, it was found that the Basic HTML text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-align>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the Basic HTML text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-align>. The text format must be saved to make these changes active.', ], ], 'expected_messages' => [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-align>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-align>. Additional details are available in your logs.', ], ], ]); @@ -822,12 +821,12 @@ public static function provider() { 'status' => [ 'The CKEditor 5 migration enabled the following plugins to support tags that are allowed by the Basic HTML (without image uploads) text format: Code (for tags: <code>). The text format must be saved to make these changes active.', 'The following tags were permitted by the Basic HTML (without image uploads) text format\'s filter configuration, but no plugin was available that supports them. To ensure the tags remain supported by this text format, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <cite> <dl> <dt> <dd> <span>. The text format must be saved to make these changes active.', - 'As part of migrating to CKEditor 5, it was found that the Basic HTML (without image uploads) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-entity-type data-entity-uuid>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the Basic HTML (without image uploads) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-entity-type data-entity-uuid>. The text format must be saved to make these changes active.', ], ], 'expected_messages' => [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-entity-type data-entity-uuid>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-entity-type data-entity-uuid>. Additional details are available in your logs.', ], ], ]; @@ -850,6 +849,7 @@ public static function provider() { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -867,12 +867,12 @@ public static function provider() { 'status' => [ 'The CKEditor 5 migration enabled the following plugins to support tags that are allowed by the Basic HTML (without H4 and H6) text format: Code (for tags: <code>). The text format must be saved to make these changes active.', 'The following tags were permitted by the Basic HTML (without H4 and H6) text format\'s filter configuration, but no plugin was available that supports them. To ensure the tags remain supported by this text format, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <cite> <dl> <dt> <dd> <span>. The text format must be saved to make these changes active.', - 'As part of migrating to CKEditor 5, it was found that the Basic HTML (without H4 and H6) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h5 id>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the Basic HTML (without H4 and H6) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <h2 id> <h3 id> <h5 id>. The text format must be saved to make these changes active.', ], ], 'expected_messages' => [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h5 id>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <h2 id> <h3 id> <h5 id>. Additional details are available in your logs.', ], ], ]; @@ -898,6 +898,7 @@ public static function provider() { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -912,12 +913,12 @@ public static function provider() { 'status' => [ 'The CKEditor 5 migration enabled the following plugins to support tags that are allowed by the Basic HTML (with <h1>) text format: Code (for tags: <code>). The text format must be saved to make these changes active.', 'The following tags were permitted by the Basic HTML (with <h1>) text format\'s filter configuration, but no plugin was available that supports them. To ensure the tags remain supported by this text format, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <cite> <dl> <dt> <dd> <span>. The text format must be saved to make these changes active.', - 'As part of migrating to CKEditor 5, it was found that the Basic HTML (with <h1>) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the Basic HTML (with <h1>) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', ], ], 'expected_messages' => [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', ], ], ]; @@ -938,6 +939,7 @@ public static function provider() { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -955,12 +957,12 @@ public static function provider() { 'status' => [ 'The CKEditor 5 migration enabled the following plugins to support tags that are allowed by the Basic HTML (without H*) text format: Code (for tags: <code>). The text format must be saved to make these changes active.', 'The following tags were permitted by the Basic HTML (without H*) text format\'s filter configuration, but no plugin was available that supports them. To ensure the tags remain supported by this text format, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <cite> <dl> <dt> <dd> <span>. The text format must be saved to make these changes active.', - 'As part of migrating to CKEditor 5, it was found that the Basic HTML (without H*) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the Basic HTML (without H*) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite>. The text format must be saved to make these changes active.', ], ], 'expected_messages' => [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <ul type> <ol type>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite>. Additional details are available in your logs.', ], ], ]; @@ -1002,12 +1004,12 @@ public static function provider() { 'status' => [ 'The CKEditor 5 migration enabled the following plugins to support tags that are allowed by the Basic HTML (with <pre>) text format: Code (for tags: <code>) Code Block (for tags: <pre>). The text format must be saved to make these changes active.', str_replace('Basic HTML', 'Basic HTML (with <pre>)', $basic_html_test_case['expected_db_logs']['status'][1]), - 'As part of migrating to CKEditor 5, it was found that the Basic HTML (with <pre>) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the Basic HTML (with <pre>) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', ], ], 'expected_messages' => [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code, Code Block). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code, Code Block). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', ], 'warning' => [ 'Updating to CKEditor 5 added support for some previously unsupported tags/attributes. A plugin introduced support for the following: This attribute: class (for <code>); Additional details are available in your logs.', @@ -1053,12 +1055,12 @@ public static function provider() { 'The CKEditor 5 migration enabled the following plugins to support tags that are allowed by the Basic HTML (with alignable paragraph support) text format: Code (for tags: <code>). The text format must be saved to make these changes active.', 'The following tags were permitted by the Basic HTML (with alignable paragraph support) text format\'s filter configuration, but no plugin was available that supports them. To ensure the tags remain supported by this text format, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <cite> <dl> <dt> <dd> <span>. The text format must be saved to make these changes active.', 'The CKEditor 5 migration process enabled the following plugins to support specific attributes that are allowed by the Basic HTML (with alignable paragraph support) text format: Alignment ( for tag: <p> to support: class with value(s): text-align-center, text-align-justify).', - 'As part of migrating to CKEditor 5, it was found that the Basic HTML (with alignable paragraph support) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the Basic HTML (with alignable paragraph support) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', ], ], 'expected_messages' => [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code, Alignment). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code, Alignment). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', ], 'warning' => [ 'Updating to CKEditor 5 added support for some previously unsupported tags/attributes. A plugin introduced support for the following: This attribute: class (for <h2>, <h3>, <h4>, <h5>, <h6>); Additional details are available in your logs.', @@ -1085,12 +1087,12 @@ public static function provider() { 'status' => [ 'The CKEditor 5 migration enabled the following plugins to support tags that are allowed by the Basic HTML (with Media Embed support) text format: Code (for tags: <code>). The text format must be saved to make these changes active.', 'The following tags were permitted by the Basic HTML (with Media Embed support) text format\'s filter configuration, but no plugin was available that supports them. To ensure the tags remain supported by this text format, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <cite> <dl> <dt> <dd> <span>. The text format must be saved to make these changes active.', - 'As part of migrating to CKEditor 5, it was found that the Basic HTML (with Media Embed support) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the Basic HTML (with Media Embed support) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', ], ], 'expected_messages' => [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', ], ], ]; @@ -1114,12 +1116,12 @@ public static function provider() { 'status' => [ 'The CKEditor 5 migration enabled the following plugins to support tags that are allowed by the (with Media Embed support, view mode enabled but no view modes configured) text format: Code (for tags: <code>). The text format must be saved to make these changes active.', 'The following tags were permitted by the (with Media Embed support, view mode enabled but no view modes configured) text format\'s filter configuration, but no plugin was available that supports them. To ensure the tags remain supported by this text format, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <cite> <dl> <dt> <dd> <span>. The text format must be saved to make these changes active.', - 'As part of migrating to CKEditor 5, it was found that the (with Media Embed support, view mode enabled but no view modes configured) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the (with Media Embed support, view mode enabled but no view modes configured) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', ], ], 'expected_messages' => array_merge_recursive($basic_html_test_case['expected_messages'], [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', ], ]), 'expected_post_filter_drop_fundamental_compatibility_violations' => [], @@ -1147,12 +1149,12 @@ public static function provider() { 'status' => [ 'The CKEditor 5 migration enabled the following plugins to support tags that are allowed by the (with Media Embed support, view mode enabled and two view modes configured ) text format: Code (for tags: <code>). The text format must be saved to make these changes active.', 'The following tags were permitted by the (with Media Embed support, view mode enabled and two view modes configured ) text format\'s filter configuration, but no plugin was available that supports them. To ensure the tags remain supported by this text format, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <cite> <dl> <dt> <dd> <span>. The text format must be saved to make these changes active.', - 'As part of migrating to CKEditor 5, it was found that the (with Media Embed support, view mode enabled and two view modes configured ) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the (with Media Embed support, view mode enabled and two view modes configured ) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', ], ], 'expected_messages' => array_merge_recursive($basic_html_test_case['expected_messages'], [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', ], ]), 'expected_post_filter_drop_fundamental_compatibility_violations' => [], @@ -1182,12 +1184,12 @@ public static function provider() { 'status' => [ 'The CKEditor 5 migration enabled the following plugins to support tags that are allowed by the Basic HTML (with any data-* attribute on images) text format: Code (for tags: <code>). The text format must be saved to make these changes active.', 'The following tags were permitted by the Basic HTML (with any data-* attribute on images) text format\'s filter configuration, but no plugin was available that supports them. To ensure the tags remain supported by this text format, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <cite> <dl> <dt> <dd> <span>. The text format must be saved to make these changes active.', - 'As part of migrating to CKEditor 5, it was found that the Basic HTML (with any data-* attribute on images) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-*>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the Basic HTML (with any data-* attribute on images) text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-*>. The text format must be saved to make these changes active.', ], ], 'expected_messages' => [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-*>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Code). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <span> <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img data-*>. Additional details are available in your logs.', ], ], ]; @@ -1232,6 +1234,7 @@ public static function provider() { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -1243,8 +1246,6 @@ public static function provider() { '
- ', '', '
', - '', - '
', '
', '
', '
', @@ -1262,7 +1263,7 @@ public static function provider() { 'status' => [ 'The CKEditor 5 migration enabled the following plugins to support tags that are allowed by the Restricted HTML text format: Link (for tags: <a>) Block quote (for tags: <blockquote>) Code (for tags: <code>) List (for tags: <ul><ol><li>). The text format must be saved to make these changes active.', 'The following tags were permitted by the Restricted HTML text format\'s filter configuration, but no plugin was available that supports them. To ensure the tags remain supported by this text format, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <cite> <dl> <dt> <dd>. The text format must be saved to make these changes active.', - 'As part of migrating to CKEditor 5, it was found that the Restricted HTML text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the Restricted HTML text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', ], 'warning' => [ 'As part of migrating the Restricted HTML text format to CKEditor 5, the following tag(s) were added to Limit allowed HTML tags and correct faulty HTML, because they are needed to provide fundamental CKEditor 5 functionality : <br> <p>. The text format must be saved to make these changes active.', @@ -1270,10 +1271,10 @@ public static function provider() { ], 'expected_messages' => [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Link, Block quote, Code, List). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Link, Block quote, Code, List). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <a hreflang> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', ], 'warning' => [ - 'Updating to CKEditor 5 added support for some previously unsupported tags/attributes. A plugin introduced support for the following: The <br>, <p> tags were added because they are required by CKEditor 5. The tags <h2>, <h3>, <h4>, <h5>, <h6>, <*>, <cite>, <dl>, <dt>, <dd>, <a>, <blockquote>, <ul>, <ol>, <strong>, <em>, <code>, <li>; These attributes: id (for <h2>, <h3>, <h4>, <h5>, <h6>), dir (for <*>), lang (for <*>), hreflang (for <a>), href (for <a>), cite (for <blockquote>), type (for <ul>, <ol>), start (for <ol>); Additional details are available in your logs.', + 'Updating to CKEditor 5 added support for some previously unsupported tags/attributes. A plugin introduced support for the following: The <br>, <p> tags were added because they are required by CKEditor 5. The tags <h2>, <h3>, <h4>, <h5>, <h6>, <*>, <cite>, <dl>, <dt>, <dd>, <a>, <blockquote>, <strong>, <em>, <code>, <ul>, <ol>, <li>; These attributes: id (for <h2>, <h3>, <h4>, <h5>, <h6>), dir (for <*>), lang (for <*>), hreflang (for <a>), href (for <a>), cite (for <blockquote>), type (for <ul>, <ol>), start (for <ol>); Additional details are available in your logs.', ], ], 'expected_post_filter_drop_fundamental_compatibility_violations' => [], @@ -1344,6 +1345,7 @@ public static function provider() { 'properties' => [ 'reversed' => TRUE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -1392,6 +1394,7 @@ public static function provider() { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -1403,8 +1406,6 @@ public static function provider() { '
- ', '', '
', - '', - '
', '
', '
', '
', @@ -1414,7 +1415,11 @@ public static function provider() { ], ], ], - 'expected_superset' => '
', + // TRICKY: the `filter_html` filter allows `
` by + // default. But the List plugin does not support specifying which specific + // types of ordered lists are allowed: it either supports all types, or + // none. That's why `
` is considered a superset. + 'expected_superset' => '
', 'expected_fundamental_compatibility_violations' => [ '' => 'CKEditor 5 needs at least the <p> and <br> tags to be allowed to be able to function. They are not allowed by the "Limit allowed HTML tags and correct faulty HTML" (filter_html) filter.', ], @@ -1422,7 +1427,7 @@ public static function provider() { 'status' => [ 'The CKEditor 5 migration enabled the following plugins to support tags that are allowed by the Only the "filter_html" filter and its default settings text format: Link (for tags: <a>) Block quote (for tags: <blockquote>) Code (for tags: <code>) List (for tags: <ul><ol><li>). The text format must be saved to make these changes active.', 'The following tags were permitted by the Only the "filter_html" filter and its default settings text format\'s filter configuration, but no plugin was available that supports them. To ensure the tags remain supported by this text format, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <cite> <dl> <dt> <dd>. The text format must be saved to make these changes active.', - 'As part of migrating to CKEditor 5, it was found that the Only the "filter_html" filter and its default settings text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <ul type> <ol type="1 A I"> <h2 id="jump-*"> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', + 'As part of migrating to CKEditor 5, it was found that the Only the "filter_html" filter and its default settings text format\'s HTML filters includes plugins that support the following tags, but not some of their attributes. To ensure these attributes remain supported, the following were added to the Source Editing plugin\'s Manually editable HTML tags: <a hreflang> <blockquote cite> <h2 id="jump-*"> <h3 id> <h4 id> <h5 id> <h6 id>. The text format must be saved to make these changes active.', ], 'warning' => [ 'As part of migrating the Only the "filter_html" filter and its default settings text format to CKEditor 5, the following tag(s) were added to Limit allowed HTML tags and correct faulty HTML, because they are needed to provide fundamental CKEditor 5 functionality : <br> <p>. The text format must be saved to make these changes active.', @@ -1430,10 +1435,10 @@ public static function provider() { ], 'expected_messages' => [ 'status' => [ - 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Link, Block quote, Code, List). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <a hreflang> <blockquote cite> <ul type> <ol type="1 A I"> <h2 id="jump-*"> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', + 'To maintain the capabilities of this text format, the CKEditor 5 migration did the following: Enabled these plugins: (Link, Block quote, Code, List). Added these tags/attributes to the Source Editing Plugin\'s Manually editable HTML tags setting: <cite> <dl> <dt> <dd> <a hreflang> <blockquote cite> <h2 id="jump-*"> <h3 id> <h4 id> <h5 id> <h6 id>. Additional details are available in your logs.', ], 'warning' => [ - 'Updating to CKEditor 5 added support for some previously unsupported tags/attributes. A plugin introduced support for the following: The <br>, <p> tags were added because they are required by CKEditor 5. The tags <h2>, <h3>, <h4>, <h5>, <h6>, <*>, <cite>, <dl>, <dt>, <dd>, <a>, <blockquote>, <ul>, <ol>, <strong>, <em>, <code>, <li>; These attributes: id (for <h2>, <h3>, <h4>, <h5>, <h6>), dir (for <*>), lang (for <*>), hreflang (for <a>), href (for <a>), cite (for <blockquote>), type (for <ul>, <ol>), start (for <ol>); Additional details are available in your logs.', + 'Updating to CKEditor 5 added support for some previously unsupported tags/attributes. A plugin introduced support for the following: The <br>, <p> tags were added because they are required by CKEditor 5. The tags <h2>, <h3>, <h4>, <h5>, <h6>, <*>, <cite>, <dl>, <dt>, <dd>, <a>, <blockquote>, <strong>, <em>, <code>, <ul>, <ol>, <li>; These attributes: id (for <h2>, <h3>, <h4>, <h5>, <h6>), dir (for <*>), lang (for <*>), hreflang (for <a>), href (for <a>), cite (for <blockquote>), type (for <ul>, <ol>), start (for <ol>); Additional details are available in your logs.', ], ], ]; diff --git a/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php b/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php index 8d4838b2faf..b020f1146ff 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php @@ -584,7 +584,7 @@ public static function provider(): array { ], 'expected_violations' => [], ]; - $data['INVALID: SourceEditing plugin configuration:
must not be allowed because List can generate
'] = [ + $data['INVALID: SourceEditing plugin configuration:
must not be allowed because List can generate
'] = [ 'ckeditor5_settings' => [ 'toolbar' => [ 'items' => [ @@ -597,6 +597,7 @@ public static function provider(): array { 'properties' => [ 'reversed' => TRUE, 'startIndex' => TRUE, + 'styles' => FALSE, ], 'multiBlock' => TRUE, ], @@ -608,10 +609,13 @@ public static function provider(): array { ], ], 'expected_violations' => [ - 'settings.plugins.ckeditor5_sourceEditing.allowed_tags.0' => 'The following attribute(s) are already supported by enabled plugins and should not be added to the Source Editing "Manually editable HTML tags" field: List (<ol start>).', + 'settings.plugins.ckeditor5_sourceEditing.allowed_tags.0' => [ + 'The following attribute(s) are already supported by enabled plugins and should not be added to the Source Editing "Manually editable HTML tags" field: List (<ol start>).', + 'The following attribute(s) can optionally be supported by enabled plugins and should not be added to the Source Editing "Manually editable HTML tags" field: List (<ol type>).', + ], ], ]; - $data['INVALID: SourceEditing plugin configuration:
must not be allowed because List can generate
'] = [ + $data['INVALID: SourceEditing plugin configuration:
must not be allowed because List can generate
'] = [ 'ckeditor5_settings' => [ 'toolbar' => [ 'items' => [ @@ -624,6 +628,7 @@ public static function provider(): array { 'properties' => [ 'reversed' => FALSE, 'startIndex' => FALSE, + 'styles' => FALSE, ], 'multiBlock' => TRUE, ], @@ -635,7 +640,7 @@ public static function provider(): array { ], ], 'expected_violations' => [ - 'settings.plugins.ckeditor5_sourceEditing.allowed_tags.0' => 'The following attribute(s) can optionally be supported by enabled plugins and should not be added to the Source Editing "Manually editable HTML tags" field: List (<ol start>).', + 'settings.plugins.ckeditor5_sourceEditing.allowed_tags.0' => 'The following attribute(s) can optionally be supported by enabled plugins and should not be added to the Source Editing "Manually editable HTML tags" field: List (<ol start type>).', ], ]; diff --git a/core/modules/ckeditor5/tests/src/Unit/ListPluginTest.php b/core/modules/ckeditor5/tests/src/Unit/ListPluginTest.php index 1efae1f5b7f..f4cc007ac1a 100644 --- a/core/modules/ckeditor5/tests/src/Unit/ListPluginTest.php +++ b/core/modules/ckeditor5/tests/src/Unit/ListPluginTest.php @@ -26,6 +26,7 @@ public static function providerGetDynamicPluginConfig(): array { 'properties' => [ 'reversed' => TRUE, 'startIndex' => FALSE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -34,7 +35,9 @@ public static function providerGetDynamicPluginConfig(): array { 'properties' => [ 'reversed' => TRUE, 'startIndex' => FALSE, - 'styles' => FALSE, + 'styles' => [ + 'useAttribute' => TRUE, + ], ], 'multiBlock' => TRUE, ], @@ -45,6 +48,7 @@ public static function providerGetDynamicPluginConfig(): array { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -53,17 +57,40 @@ public static function providerGetDynamicPluginConfig(): array { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => [ + 'useAttribute' => TRUE, + ], + ], + 'multiBlock' => TRUE, + ], + ], + ], + 'styles is false' => [ + [ + 'properties' => [ + 'reversed' => TRUE, + 'startIndex' => TRUE, + 'styles' => FALSE, + ], + 'multiBlock' => TRUE, + ], + [ + 'list' => [ + 'properties' => [ + 'reversed' => TRUE, + 'startIndex' => TRUE, 'styles' => FALSE, ], 'multiBlock' => TRUE, ], ], ], - 'both disabled' => [ + 'all disabled' => [ [ 'properties' => [ 'reversed' => FALSE, 'startIndex' => FALSE, + 'styles' => FALSE, ], 'multiBlock' => TRUE, ], @@ -78,11 +105,12 @@ public static function providerGetDynamicPluginConfig(): array { ], ], ], - 'both enabled' => [ + 'all enabled' => [ [ 'properties' => [ 'reversed' => TRUE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -91,7 +119,9 @@ public static function providerGetDynamicPluginConfig(): array { 'properties' => [ 'reversed' => TRUE, 'startIndex' => TRUE, - 'styles' => FALSE, + 'styles' => [ + 'useAttribute' => TRUE, + ], ], 'multiBlock' => TRUE, ], diff --git a/core/profiles/demo_umami/config/install/editor.editor.basic_html.yml b/core/profiles/demo_umami/config/install/editor.editor.basic_html.yml index 60cd331cc87..a2ea7d8d5f7 100644 --- a/core/profiles/demo_umami/config/install/editor.editor.basic_html.yml +++ b/core/profiles/demo_umami/config/install/editor.editor.basic_html.yml @@ -37,6 +37,7 @@ settings: properties: reversed: false startIndex: true + styles: true multiBlock: false ckeditor5_sourceEditing: allowed_tags: @@ -46,8 +47,6 @@ settings: - '
- ' - '' - '
' - - '' - - '
' - '
' - '
' - '
' diff --git a/core/profiles/demo_umami/config/install/editor.editor.full_html.yml b/core/profiles/demo_umami/config/install/editor.editor.full_html.yml index 307861f05c8..4c17465ec66 100644 --- a/core/profiles/demo_umami/config/install/editor.editor.full_html.yml +++ b/core/profiles/demo_umami/config/install/editor.editor.full_html.yml @@ -42,6 +42,7 @@ settings: properties: reversed: false startIndex: false + styles: true multiBlock: true ckeditor5_sourceEditing: allowed_tags: { } diff --git a/core/profiles/standard/config/install/editor.editor.basic_html.yml b/core/profiles/standard/config/install/editor.editor.basic_html.yml index a31e41506fd..368bed22c17 100644 --- a/core/profiles/standard/config/install/editor.editor.basic_html.yml +++ b/core/profiles/standard/config/install/editor.editor.basic_html.yml @@ -39,6 +39,7 @@ settings: properties: reversed: false startIndex: true + styles: true multiBlock: true ckeditor5_sourceEditing: allowed_tags: @@ -48,8 +49,6 @@ settings: - '
- ' - '' - '
' - - '' - - '
' - '
' - '
' - '
' diff --git a/core/profiles/standard/config/install/editor.editor.full_html.yml b/core/profiles/standard/config/install/editor.editor.full_html.yml index e30fc15eaf3..3b5a2729fc8 100644 --- a/core/profiles/standard/config/install/editor.editor.full_html.yml +++ b/core/profiles/standard/config/install/editor.editor.full_html.yml @@ -89,6 +89,7 @@ settings: properties: reversed: true startIndex: true + styles: true multiBlock: true ckeditor5_sourceEditing: allowed_tags: { } diff --git a/core/themes/claro/css/base/elements.css b/core/themes/claro/css/base/elements.css index bb875fa6a96..10038654a77 100644 --- a/core/themes/claro/css/base/elements.css +++ b/core/themes/claro/css/base/elements.css @@ -195,7 +195,6 @@ ul { margin-block: 0.25em; margin-inline: 1.5em 0; padding-inline-start: 0; - list-style-type: disc; list-style-image: none; } diff --git a/core/themes/claro/css/base/elements.pcss.css b/core/themes/claro/css/base/elements.pcss.css index 9d2cda3c20d..5e4097a5f98 100644 --- a/core/themes/claro/css/base/elements.pcss.css +++ b/core/themes/claro/css/base/elements.pcss.css @@ -158,7 +158,6 @@ ul { margin-block: 0.25em; margin-inline: 1.5em 0; padding-inline-start: 0; - list-style-type: disc; list-style-image: none; } ol { diff --git a/core/themes/olivero/css/base/base.css b/core/themes/olivero/css/base/base.css index e033ba794e9..3ac1fc1cf26 100644 --- a/core/themes/olivero/css/base/base.css +++ b/core/themes/olivero/css/base/base.css @@ -156,6 +156,5 @@ ul { margin-inline-start: 1.5em; margin-inline-end: 0; padding-inline-start: 0; - list-style-type: disc; list-style-image: none; } diff --git a/core/themes/olivero/css/base/base.pcss.css b/core/themes/olivero/css/base/base.pcss.css index 69a24cf9ede..c8d0d70d405 100644 --- a/core/themes/olivero/css/base/base.pcss.css +++ b/core/themes/olivero/css/base/base.pcss.css @@ -137,6 +137,5 @@ ul { margin-inline-start: 1.5em; margin-inline-end: 0; padding-inline-start: 0; - list-style-type: disc; list-style-image: none; }