From 953a69bf530ed377c866955c437c33e0c74c3de3 Mon Sep 17 00:00:00 2001 From: bnjmnm Date: Thu, 28 Apr 2022 07:02:38 -0400 Subject: [PATCH] Issue #3261599 by hooroomoo, Wim Leers, lauriii: Use CKEditor 5's native
    support (and also support
      ) --- .../modules/ckeditor5/ckeditor5.ckeditor5.yml | 14 ++- .../config/schema/ckeditor5.schema.yml | 16 +++ .../src/Plugin/CKEditor4To5Upgrade/Core.php | 14 +++ .../src/Plugin/CKEditor5Plugin/ListPlugin.php | 90 ++++++++++++++++ .../src/Plugin/CKEditor5PluginManager.php | 4 +- .../CKEditor5AllowedTagsTest.php | 2 +- .../FunctionalJavascript/CKEditor5Test.php | 90 +++++++++++++++- .../src/Kernel/CKEditor5PluginManagerTest.php | 3 +- .../src/Kernel/ConfigurablePluginTest.php | 4 + .../src/Kernel/SmartDefaultSettingsTest.php | 49 ++++++--- .../tests/src/Kernel/ValidatorsTest.php | 7 +- .../tests/src/Unit/ListPluginTest.php | 102 ++++++++++++++++++ 12 files changed, 372 insertions(+), 23 deletions(-) create mode 100644 core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/ListPlugin.php create mode 100644 core/modules/ckeditor5/tests/src/Unit/ListPluginTest.php diff --git a/core/modules/ckeditor5/ckeditor5.ckeditor5.yml b/core/modules/ckeditor5/ckeditor5.ckeditor5.yml index a2f8f55c226..e3256c37d73 100644 --- a/core/modules/ckeditor5/ckeditor5.ckeditor5.yml +++ b/core/modules/ckeditor5/ckeditor5.ckeditor5.yml @@ -352,11 +352,21 @@ ckeditor5_linkMedia: ckeditor5_list: ckeditor5: - plugins: [list.List] + plugins: + - list.List + - list.ListProperties + config: + list: + properties: + reversed: true + startIndex: true + # @todo Make this configurable in https://www.drupal.org/project/drupal/issues/3274635 + styles: false drupal: label: List library: core/ckeditor5.list admin_library: ckeditor5/admin.list + class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin toolbar_items: bulletedList: label: Bulleted list @@ -364,7 +374,7 @@ ckeditor5_list: label: Numbered list elements: -