Needs review
Project:
CKEditor List Style
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Plan
Assigned:
Unassigned
Reporter:
Created:
13 Dec 2022 at 20:12 UTC
Updated:
13 Jun 2025 at 14:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rajkumar2030 commentedAny update.
Comment #3
rajkumar2030 commentedPlease update this issue has been fixed or not , Thanks!
Comment #6
s_leu commentedThis can now be reviewed. The MR will integrate the list styles options as in the ckeditor5 demo of this feature.
The patch is based on a customized version of the ckeditor5-list package which is part of the ckeditor5 main repo.The reason for including the plugin that way is that it's based on the ongoing work to bring this functionality into core, which unfortunately is blocked by a bug in ckeditor5 itself, see also the corresponding comment in the core issue.
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 is currently required to make this patch work.
Comment #7
vipul tulse commentedComment #8
vipul tulse commentedHello 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
Comment #9
bserem commentedBecause 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.
Comment #10
bserem commentedRe-roll of all work towards the latest (1.5) version of the module.
MR updated.
Comment #11
wim leersThis will be obsolete once #3274635: [upstream] Use CKEditor 5's native <ol type> and <ul type> UX lands in Drupal core 😊
Please review that, so we can land it there!
Comment #12
bousley commentedAny update on this functionality? Thank you for your hard work. This is eagerly anticipated and much needed. Thanks again!
Comment #13
vipul tulse commented@s_leu there one issue I'm facing, unable to add a code block inside list
can you check
Comment #14
yivanov commentedWhile using this patch and upgrading to Drupal core 10.2.1, I get the following issue:
Comment #15
chrisla commentedI am getting same issue as #14 when upgrading to Drupal 10.2.1. Only solution for me was to uninstall the module for now
Comment #16
chrisla commentedI 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-...
Comment #17
sassafrass commentedUsing:
"drupal/core-recommended": "^10.2"
"drupal/ckeditor_liststyle": "1.x-dev@dev"
Also getting the error in #14:
Comment #18
jncrucesConfirmed 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.
Comment #19
jncrucesAdding interdiff.
Comment #20
akshayadimolam commentedUsing:
"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:
When I remove the patch and test it, the above issue is not repeating.
Comment #21
tomefa commentedGetting this error also with Drupal 10.2.4, ckeditor_liststyle 1.5.0 + this patch #18
And the CKEditor textarea is empty.
Comment #22
mvnovick commentedI am getting the the problem as described above with Drupal 10.2.2, CKEditor List Style 1.5, and patch #18.
Comment #23
tomefa commentedThe 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.
Comment #24
tomefa commentedComment #25
tomefa commentedFYI: 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
Comment #26
loopy1492 commentedSame error for us when we apply 23. This is a real bummer. The core project @Tomefa linked is too buggy for us to use. For some reason all of these base themes have set the list styles at a fundamental level. Never mind the fact that ckeditor injects it onto the page itself with /docroot/core/assets/vendor/ckeditor5/list/list.js
Edit: nuts. Imported config and busted again.
Edit edit. Wow. I just noticed how this module is overriding list.js... it has its own committed to the repo. That is wild.
Comment #27
loopy1492 commentedThe list style buttons seem to work, but when the wysiwyg loads, I'm still getting this in the console:
And every time we switch text formats, the toolbar duplicates ad nauseum.
Comment #28
loopy1492 commentedAnd I'm getting these errors when editing two different text formats:
and
Comment #29
loopy1492 commentedI noticed there's no ckeditor5.yml file for this module. That's where the plugins would be defined. Isn't this file necessary for any ckeditor 5 module?
Comment #30
loopy1492 commentedCloned comment from https://www.drupal.org/node/3283526
I added a ckeditor5.yml file:
And we are getting:
LogicException: The "ckeditor_liststyle_liststyle" CKEditor 5 plugin implements ::getElementsSubset() and did return a subset ("<ul type><ol type reversed start>") but the following tags can no longer be created: "<ul><ol>". in Drupal\ckeditor5\Plugin\CKEditor5PluginManager->getProvidedElements() (line 409 of /home/ide/project/docroot/core/modules/ckeditor5/src/Plugin/CKEditor5PluginManager.php).And of course the eternal problem of this message on the text format.
Even adding the ul and ol manually to the config yml file won't override the Allowed HTML tags on import.
So what are we supposed to do?
Comment #31
loopy1492 commentedI genuinely have no idea what's going on with this module but we pinned to
"drupal/ckeditor_liststyle": "1.x-dev#a34d9baa310af13de950e6e1f46c38faa6ac7c07",And another one of our team members simply created a ckeditor 5 patch for the info file
And the module works.
This makes literally no sense whatsoever but here we are. My guess is the most recent version of the library works fine and any addional Drupaly stuff isn't really necessary to make sure the plugin works in general.
Specifically, I believe whatever code was added to make the "styles" toggle work in the new code is busted in many ways. If you want this module to work, simply pin the release to the version and hash I have marked above and use the patch I added below. Hopefully this lets us ride it out until the core issue is completed and we have list styles as a part of core.
Comment #32
loopy1492 commentedComment #33
sassafrass commentedComment #34
loopy1492 commentedI mis-spoke. It only works on the full_html text format ... I assume because it allows for the changing of any HTML tag? I'm guessing since every other text format must abide by whatever tags are allowed by the different plugins, ul type and ol type cannot be added.
I don't know. This is a bit of a mess.
Comment #35
myst1c commentedI’ve reviewed and tested the patch (#10), and I’ve had it working in a project for a while now.
Comment #36
dak5859 commentedAny movement on updates to this module to make it compatible with CKEditor5? We're on core 10.4.5. The workarounds on this thread seem to indicate we'd have to keep the deprecated CKEditor4 dependency enabled as well which we wouldn't want to do.
Comment #37
dak5859 commentedAs a follow up to my last comment/question. I ended up using the 10.4.5 core patch that brings this same functionality via https://www.drupal.org/project/drupal/issues/3274635#comment-16045633. Looks as though they're getting very close to merging this update into core as well. Hoping this patch is short lived.