Problem/Motivation
We "solved" the problem of supporting <ol type> and <ul type> by using the SourceEditing functionality for that.
But in CKEditor 5 32.0.0, they've added a native UX for setting the list type:
Which means that rather than having to edit HTML by hand, the content creator can now do that through the UI! But unfortunately, it currently always generates <ol style="list-style-type:SOMETHING"> and <ul style="list-style-type:SOMETHING">, so we cannot use this.
This is blocked on https://github.com/ckeditor/ckeditor5/issues/11615. This is blocked on https://github.com/ckeditor/ckeditor5/issues/14613 per #20 (thanks @s_leu!).
It'd also improve the upgrade path from CKEditor 4 because these attributes would no longer have to get set through the SourceEditing functionality.
Steps to reproduce
N/A
Proposed resolution
See above.
Remaining tasks
- ✅
Setstyles.useAttribute = trueper https://github.com/ckeditor/ckeditor5/issues/11615, this ensures thetypeattribute will be generated instead of astyleattribute - ✅
Add configuration to\Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin::buildConfigurationForm(), to allow enabling thetypeattribute or not - ✅
Expand the config schema underckeditor5.plugin.ckeditor5_listinckeditor5.schema.yml - ✅
Expand unit test coverage in\Drupal\Tests\ckeditor5\Unit\ListPluginTest - ✅
Update path (+ tests) to automatically enable this if and only if they were previously allowing<ol type>or<ul type>to be set Optional: add more configuration to→ CKEditor 5 does not yet support restricting this to specific types.\Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin::buildConfigurationForm(), to allow configuring which listtypeattribute values are allowed. (e.g.type="A"for<ol>ortype="circle"for<ul>).
User interface changes
Extra configuration in UI:
API changes
None.
Data model changes
None.
Release notes snippet
Previously, setting <ol type> or <ul type> required manually writing HTML in CKEditor 5's "Source Editing" view. Now, the native UI functionality is available to set list style types for ordered lists (letters and Roman numerals instead of only numbers) and unordered lists (circles and squares instead of only discs).