-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<ul type> and <ol type> not supported by List nor ListProperties #11615
Comments
Sibling Drupal issue: https://www.drupal.org/project/drupal/issues/3274651 |
Related: #11595. |
Quick note about GHS + list: The old list feature had no integration with GHS. Only the new one (document lists) has.
AFAIR it didn't work when we discussed it the last time. Also, I think it could never work via GHS because we never had integration with lists for it. |
I've just checked that loading the below content to CKEditor 4:
Makes it return this data:
In other words, CKEditor 4 normalizes We could add similar logic to the CKEditor 5 document list's upcast. Random thoughts:
|
Does that mean that per this bit of #2973 (comment):
… Drupal updating to CKEditor 5 |
It definitely worked fine in CKEditor 4 + ACF — this is a freshly installed Drupal 9, with no configuration changes at all. This is how it works out of the box. ol.type.in.CKE4.mov |
I did some research on whether it would be feasible to override the downcast and upcast for this per request from @wimleers. We could do a pretty scoped override if we could either override If that's not feasible, we could still override the upcast and downcast for the |
We discussed this on a refinement meeting whether it'll be easier for us to make the current downcast/upcast strategies easily extensible/overridable or simply implementing the support for We came to a conclusion that the config option will be easier. |
Scope:
|
There's a problem that the `type` attribute supports a subset of the options supported by CSS and by our UI. Values supported by the attribute:
Our UI: So the attribute does not support the Proposed approach:
|
This piece of the title can be removed — see #11595 (comment) 😊
👍 Sounds like a great plan!
👍 This seems totally reasonable 😊 |
Just to make sure we’re on the same page: because the “hard crash” part of IOW: your theory was correct, once we switched to For that we have https://www.drupal.org/project/drupal/issues/3274635. 🚀 |
Feature (list): Added support for the `type` attribute of `<ul>` and `<ol>` elements in addition to the `list-style-type` style. Closes #11615.
📝 Provide detailed reproduction steps (if any)
While bringing the
<ol start>
and<ol reversed>
functionality to Drupal core, we’re also looking at<ol type>
and<ul type>
, because as https://ckeditor.com/blog/ckeditor-5-v32.0.0-with-new-list-properties-support-for-the-script-tag-and-enhanced-mentions/ mentions, this is now supported too and has a magnificent UX.https://ckeditor.com/docs/ckeditor5/latest/api/module_list_listproperties-ListPropertiesConfig.html#member-styles says:
But:
list-style-type
HTML attribute. Only atype
attribute.list-style-type
.<ul style="list-style-type
and<ol style="list-style-type
, but zero for<ul type
and<ol type
Conclusion:
Because
ListProperties
' support for list style types does not work for<ol type>
or<ul type>
, despite that being in the HTML spec:→ No downcast support, but also, more worryingly still, no upcast support.
Therefore the only work-around is to use GHS to add support for these. But … that also does not work:
htmlSupport.GeneralHtmlSupport
,list.List
, with the followinghtmlSupport
config:I strongly suspect that
v32
caused this to not work with GHS anymore, because I do recall testing this a long time ago and it worked fine then.✔️ Expected result
CKEditor 5 retains the
type
attribute.❌ Actual result
It does not.
📃 Other details
v33.0.0
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: