Make ckeditor_liststyle compatible with ckeditor5

Created on 13 December 2022, over 1 year ago
Updated 15 April 2024, 2 months ago

Problem/Motivation

CKeditor 4 will be removed in Drupal 10 and ckeditor5 has been introduced as a core module in Drupal 9.4. This module should now be made compatible with ckeditor5 and replace ckeditor as a dependency.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🌱 Plan
Status

Needs review

Version

1.0

Component

Code

Created by

🇺🇸United States brooke_heaton

Live updates comments and jobs are added and updated live.
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.

  • First commit to issue fork.
  • @s_leu opened merge request.
  • Status changed to Needs review 11 months ago
  • This can now be reviewed. The MR will integrate the list styles options as in the ckeditor5 demo here: https://ckeditor.com/docs/ckeditor5/latest/features/lists/document-lists...

    The patch is based on a customized version of the ckeditor5-list package which is part of the ckeditor5 main repo: https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-list . The reason for including the plugin that way is that it's based on the ongoing work to bring this functionality into core [upstream] Use CKEditor 5's native and UX Needs work , which unfortunately is blocked by a bug in ckeditor5 itself, see also the corresponding comment in the core issue [upstream] Use CKEditor 5's native and UX Needs work .

    The customized version of the ckeditor5 included in the MR solves these problems and is a shortcut to make this functionality available in Drupal right now, as it's uncertain how long a fix in ckeditor5 and a corresponding update of ckeditor5 inside Drupal core will take to be committed.

    Please note that the following core patch in this comment [upstream] Use CKEditor 5's native and UX Needs work is currently required to make this patch work.

  • Assigned to vipul tulse
  • Issue was unassigned.
  • Status changed to RTBC 11 months ago
  • 🇮🇳India vipul tulse

    Hello s_leu,

    I have cloned the module and enabled it locally, the module working fine and covers all the functionality from the existing module
    list type (e.g. circle, square, dot for bulleted list or decimal, lower/upper roman, lower/upper alpha for numbered list)
    start number (for numbered list).

    Please check the screenshot, all the options working fine

  • 🇬🇷Greece bserem

    Because usage of MRs directly in composer is a bad practice (cause they are dynamic), I'm adding a patch file (which is static) of the MR as it is today, to be used until this gets included in the project.

    Thanks for all the work done here.

  • 🇬🇷Greece bserem

    Re-roll of all work towards the latest (1.5) version of the module.
    MR updated.

  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    This will be obsolete once [upstream] Use CKEditor 5's native and UX Needs work lands in Drupal core 😊

    Please review that, so we can land it there!

  • 🇺🇸United States bousley Las Vegas, Nevada

    Any update on this functionality? Thank you for your hard work. This is eagerly anticipated and much needed. Thanks again!

  • 🇮🇳India vipul tulse

    @s_leu there one issue I'm facing, unable to add a code block inside list
    can you check

  • 🇧🇬Bulgaria yivanov

    While using this patch and upgrading to Drupal core 10.2.1, I get the following issue:

    The "ckeditor5_list" CKEditor 5 plugin definition is configurable, but its default configuration does not match its config schema. The following errors were found: [properties] missing schema, [multiBlock] missing schema.

  • 🇨🇦Canada endless_wander

    I am getting same issue as #14 when upgrading to Drupal 10.2.1. Only solution for me was to uninstall the module for now

  • 🇨🇦Canada endless_wander

    I was able to resolve issue from #14 by removing the patch from #10 I was applying -- https://www.drupal.org/files/issues/2023-08-15/3326957-liststyle_ck5-10-...

  • 🇺🇸United States sassafrass

    Using:

    "drupal/core-recommended": "^10.2"
    "drupal/ckeditor_liststyle": "1.x-dev@dev"

    Also getting the error in #14:

    Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "ckeditor5_list" CKEditor 5 plugin definition is configurable, but its default configuration does not match its config schema. The following errors were found: [properties] missing schema, [multiBlock] missing schema. in Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition->validateDrupalAspects() (line 190 of core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php).
    
  • 🇪🇸Spain jncruces Sevilla

    Confirmed the problem with D10.2.

    The next patch solves the problem but I know that it needs more work because the schema of the configuration is incorrect. The patch works but needs more work.

  • Status changed to Needs review 4 months ago
  • 🇪🇸Spain jncruces Sevilla

    Adding interdiff.

  • 🇺🇸United States akshayadimolam Albany

    Using:

    "drupal/core-recommended": "^10.2",
    "drupal/ckeditor_liststyle": "1.x-dev@dev"

    Not getting any onscreen error when applied patch #18. But when I try to switch the text format on the editor, the editor box is getting added on top of each whenever we switch the text format. Attached is the screenshot. And Attached the console error:

    ckeditor5.js?s9w418:477 CKEditorError: schema-cannot-extend-missing-item {"itemName":"$listItem"}
    Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-schema-cannot-extend-missing-item
        at li.extend (ckeditor5-dll.js?v=40.2.0:5:312284)
        at On.<anonymous> (html-support.js?v=40.2.0:5:62810)
        at On.fire (ckeditor5-dll.js?v=40.2.0:5:604093)
        at On._fireRegisterEvent (html-support.js?v=40.2.0:5:45500)
        at editor.data.on.priority (html-support.js?v=40.2.0:5:43517)
        at Vi.fire (ckeditor5-dll.js?v=40.2.0:5:604093)
        at <computed> [as init] (ckeditor5-dll.js?v=40.2.0:5:607777)
        at editor-classic.js?v=40.2.0:4:9696
    (anonymous)	@	ckeditor5.js?s9w418:477

    When I remove the patch and test it, the above issue is not repeating.

  • 🇩🇪Germany Tomefa Dresden

    Getting this error also with Drupal 10.2.4, ckeditor_liststyle 1.5.0 + this patch #18
    And the CKEditor textarea is empty.

  • I am getting the the problem as described above with Drupal 10.2.2, CKEditor List Style 1.5, and patch #18.

  • 🇩🇪Germany Tomefa Dresden

    The problem, after applying the patch, is in the file config/schema/ckeditor_liststyle.schema.yml
    it is not having the correct configuration.

    Here the patch updated, and the diff.

  • 🇩🇪Germany Tomefa Dresden
  • 🇩🇪Germany Tomefa Dresden

    FYI: we have decide to uninstall this module and use the patch that bring the same functionality but directly in Drupal core: https://www.drupal.org/project/drupal/issues/3274635#comment-15507417 [upstream] Use CKEditor 5's native and UX Needs work

Production build 0.69.0 2024