diff --git a/core/modules/ckeditor5/ckeditor5.ckeditor5.yml b/core/modules/ckeditor5/ckeditor5.ckeditor5.yml index 7a259c8118..44c3340e36 100644 --- a/core/modules/ckeditor5/ckeditor5.ckeditor5.yml +++ b/core/modules/ckeditor5/ckeditor5.ckeditor5.yml @@ -390,11 +390,8 @@ ckeditor5_list: plugins: - list.DocumentList - list.DocumentListProperties - 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 @@ -410,6 +407,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 edc3b94576..e2ae6a73c9 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php @@ -635,14 +635,16 @@ public function testListPlugin() { 'editor' => 'ckeditor5', 'settings' => [ 'toolbar' => [ - 'items' => ['sourceEditing', 'numberedList'], + 'items' => ['sourceEditing', 'numberedList', 'bulletedList'], ], 'plugins' => [ 'ckeditor5_list' => [ 'properties' => [ 'reversed' => FALSE, 'startIndex' => FALSE, + 'styles' => FALSE, ], + 'multiBlock' => FALSE, ], 'ckeditor5_sourceEditing' => [ 'allowed_tags' => [], @@ -673,7 +675,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'); @@ -708,6 +710,71 @@ 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 255c264c63..8fabe98482 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php @@ -86,6 +86,7 @@ public function testMediaSplitList() { '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 a638d56765..e809dbfe67 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php @@ -218,37 +218,6 @@ public 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 d41ffcaa3e..300adddd7c 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 1e09a5b91b..af56e3f1c0 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() { '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 8dcc6bc9ce..129c96021e 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/ConfigurablePluginTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/ConfigurablePluginTest.php @@ -92,6 +92,7 @@ public function testDefaults() { '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 99235f7264..af24487a92 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php @@ -694,6 +694,7 @@ public function provider() { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -706,8 +707,6 @@ public function provider() { '', '', '
', - '', - '
', '
', '
', '
', @@ -733,12 +732,12 @@ public 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.', ], ], ] @@ -761,12 +760,12 @@ public 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.', ], ], ]); @@ -788,12 +787,12 @@ public 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.', ], ], ]); @@ -821,12 +820,12 @@ public 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.', ], ], ]; @@ -849,6 +848,7 @@ public function provider() { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -866,12 +866,12 @@ public 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.', ], ], ]; @@ -897,6 +897,7 @@ public function provider() { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -911,12 +912,12 @@ public 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.', ], ], ]; @@ -937,6 +938,7 @@ public function provider() { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -954,12 +956,12 @@ public 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.', ], ], ]; @@ -1001,12 +1003,12 @@ public 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.', @@ -1052,12 +1054,12 @@ public 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.', @@ -1084,12 +1086,12 @@ public 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.', ], ], ]; @@ -1113,12 +1115,12 @@ public 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' => [], @@ -1146,12 +1148,12 @@ public 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' => [], @@ -1181,12 +1183,12 @@ public 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.', ], ], ]; @@ -1231,6 +1233,7 @@ public function provider() { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -1242,8 +1245,6 @@ public function provider() { '
- ', '', '
', - '', - '
', '
', '
', '
', @@ -1261,7 +1262,7 @@ public 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.', @@ -1269,10 +1270,10 @@ public 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' => [], @@ -1343,6 +1344,7 @@ public function provider() { 'properties' => [ 'reversed' => TRUE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -1391,6 +1393,7 @@ public function provider() { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -1402,8 +1405,6 @@ public function provider() { '
- ', '', '
', - '', - '
', '
', '
', '
', @@ -1413,7 +1414,11 @@ public 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.', ], @@ -1421,7 +1426,7 @@ public 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.', @@ -1429,10 +1434,10 @@ public 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 adacf4d2c0..a82e87db83 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/ValidatorsTest.php @@ -578,7 +578,7 @@ public function provider(): array { ], '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
'] = [ 'settings' => [ 'toolbar' => [ 'items' => [ @@ -591,6 +591,7 @@ public function provider(): array { 'properties' => [ 'reversed' => TRUE, 'startIndex' => TRUE, + 'styles' => FALSE, ], 'multiBlock' => TRUE, ], @@ -602,10 +603,13 @@ public function provider(): array { ], ], '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
'] = [ 'settings' => [ 'toolbar' => [ 'items' => [ @@ -618,6 +622,7 @@ public function provider(): array { 'properties' => [ 'reversed' => FALSE, 'startIndex' => FALSE, + 'styles' => FALSE, ], 'multiBlock' => TRUE, ], @@ -629,7 +634,7 @@ public function provider(): array { ], ], '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 1173e417fb..6c9149cf05 100644 --- a/core/modules/ckeditor5/tests/src/Unit/ListPluginTest.php +++ b/core/modules/ckeditor5/tests/src/Unit/ListPluginTest.php @@ -26,6 +26,7 @@ public function providerGetDynamicPluginConfig(): array { 'properties' => [ 'reversed' => TRUE, 'startIndex' => FALSE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -34,7 +35,9 @@ public function providerGetDynamicPluginConfig(): array { 'properties' => [ 'reversed' => TRUE, 'startIndex' => FALSE, - 'styles' => FALSE, + 'styles' => [ + 'useAttribute' => TRUE, + ], ], 'multiBlock' => TRUE, ], @@ -45,6 +48,7 @@ public function providerGetDynamicPluginConfig(): array { 'properties' => [ 'reversed' => FALSE, 'startIndex' => TRUE, + 'styles' => TRUE, ], 'multiBlock' => TRUE, ], @@ -53,17 +57,40 @@ public 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, ], @@ -91,7 +118,9 @@ public 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 d87f1cc4a3..77b734d323 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 dd7cf0a065..3e99b3b7c6 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 07b13d8e16..e82ef6a9db 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 a27ed46a5e..48a880b3be 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 37aebdb252..b92352a171 100644 --- a/core/themes/claro/css/base/elements.css +++ b/core/themes/claro/css/base/elements.css @@ -192,7 +192,6 @@ ul { margin-block: 0.25em; margin-inline: 1.5em 0; padding-inline-start: 0; - list-style-type: disc; list-style-image: none; } @@ -200,7 +199,6 @@ ol { margin-block: 0.25em; margin-inline: 2em 0; padding: 0; - list-style-type: decimal; } /** diff --git a/core/themes/claro/css/base/elements.pcss.css b/core/themes/claro/css/base/elements.pcss.css index a6e8c11104..424570416a 100644 --- a/core/themes/claro/css/base/elements.pcss.css +++ b/core/themes/claro/css/base/elements.pcss.css @@ -156,14 +156,12 @@ ul { margin-block: 0.25em; margin-inline: 1.5em 0; padding-inline-start: 0; - list-style-type: disc; list-style-image: none; } ol { margin-block: 0.25em; margin-inline: 2em 0; padding: 0; - list-style-type: decimal; } /** diff --git a/core/themes/olivero/css/base/base.css b/core/themes/olivero/css/base/base.css index 70471f960e..e56e9de8cb 100644 --- a/core/themes/olivero/css/base/base.css +++ b/core/themes/olivero/css/base/base.css @@ -153,6 +153,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 dc8c93d109..4dda0440dd 100644 --- a/core/themes/olivero/css/base/base.pcss.css +++ b/core/themes/olivero/css/base/base.pcss.css @@ -135,6 +135,5 @@ ul { margin-inline-start: 1.5em; margin-inline-end: 0; padding-inline-start: 0; - list-style-type: disc; list-style-image: none; }