Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295148

Use CKEditor 5's native <ol type> and <ul type> UX

$
0
0

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.

It'd also improve the upgrade path 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

  1. Set styles.useAttribute = true per https://github.com/ckeditor/ckeditor5/issues/11615, this ensures the type attribute will be generated instead of a style attribute
  2. Expand the
  3. Add configuration to \Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin::buildConfigurationForm(), to allow enabling the type attribute or not
  4. Expand the config schema under ckeditor5.plugin.ckeditor5_list in ckeditor5.schema.yml
  5. Expand unit test coverage in \Drupal\Tests\ckeditor5\Unit\ListPluginTest
  6. Optional: add more configuration to \Drupal\ckeditor5\Plugin\CKEditor5Plugin\ListPlugin::buildConfigurationForm(), to allow configuring which list type attribute values are allowed. (e.g. type="A" for <ol> or type="circle" for <ul>).→ CKEditor 5 does not yet support restricting this to specific types.

User interface changes

Extra configuration in UI:

@todo: screenshot

API changes

None.

Data model changes

None.

Release notes snippet

None.


Viewing all articles
Browse latest Browse all 295148

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>