Use CKEditor 5's native <ol start> support (and also support <ol reversed>)

Created on 31 January 2022, almost 3 years ago
Updated 26 October 2023, about 1 year ago

Problem/Motivation

We "solved" the problem of supporting <ol start> by using the SourceEditing functionality for that.

But in CKEditor 5 32.0.0, they've added native support for <ol start> (and even for <ol reversed>).

Which means that rather than having to edit HTML by hand, the content creator can now do that through the UI!

Steps to reproduce

N/A

Proposed resolution

Use it!

Clearest example I could find of how to configure this: https://github.com/ckeditor/ckeditor5/commit/99c818c7b9ddf62aa958b9d265d...

Remaining tasks

After Drupal is updated to that version of CKEditor 5, we should modify the ckeditor5_list plugin definition to:

  1. have a plugin class that allows the site builder to configure the list functionality to specify the starting index and whether the ordered list should be reversed (two separate booleans to store). See \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Heading for an example — note this will also require an addition to the config schema, but that too has an example
  2. this should cause \Drupal\Tests\ckeditor5\Kernel\SmartDefaultSettingsTest to fail — because a better upgrade path becomes possible, so we should update that test coverage

User interface changes

TBD

API changes

None.

Data model changes

None.

Release notes snippet

TBD

📌 Task
Status

Fixed

Version

9.3

Component
CKEditor 5 

Last updated 1 day ago

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024