- Issue created by @ramprassad
- 🇮🇳India ramprassad
This is in FullHTML text format(updated the description), so all tags are getting allowed. If we use with li like this
<ul id="divisionitemlist" class="text0"><li>​</li></ul>
, it is gettin allowed but the- s are expected to populate through scripts.
- 🇺🇸United States cilefen
Is this an attribute of CKEditor 5 itself? Can you verify at https://ckeditor.com/ckeditor-5/demo/html-support/?
- 🇮🇳India ramprassad
Its not working in https://ckeditor.com/ckeditor-5/demo/html-support/ - here as well it is removing the entire 'ul' tag as in Drupal's CKE5. But I could see this working in https://ckeditor.com/docs/ckeditor5/latest/features/source-editing.html. It just replaces with intead of removing 'ul'which is fine (pls see attached screenshot cke5souceediting.png)
- Status changed to Postponed: needs info
9 months ago 2:49pm 19 December 2023 - 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺
A
<ul>
(or<ol>
) without a<li>
is:- invalid HTML
- impossible to create using the UI (unless you've found a way? 😄 If so: please share it!)
- only possible to create by manually typing invalid HTML using the Source Editing plugin
I don't quite understand what the use case is for this? 😅
- 🇮🇳India ramprassad
@Wim,
The content editors are populating the content with the initial markup<ul id="divisionitemlist" class="text0">​</ul>
and the<li>s
will be generated using the script available in the content as mentioned in #5. This has worked fine for them in CKE4, so they expect this to work in CKE5 in D10.I checked with the standalone CKE5 and this works fine as in https://ckeditor.com/docs/ckeditor5/latest/features/source-editing.html, the 'ul' doesn't get stripped when we use the GeneralHtmlSupport plugin along with htmlSupport: {allow: [{name: /.*/,attributes: true,classes: true,styles: true}]. But in Drupal 10.1.7 it is getting stripped for some reason, I'm still checking on this. Any ideas or thoughts?
Regards,
Ramprassad - 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺
@ramprassad Can you still reproduce this in Drupal 10.2?
- 🇺🇸United States Larry Jones
I still see this issue in Drupal 10.2.7, when I switch from ckeditor4 to ckeditor5.
In Structure | Content types | custom1 | Manage fields | Default value | Body field, this line:
<ul class="iti" data-toc="div.fyi"> </ul>
allows my custom javascript to build a table of contents of header tags within div class="fyi"
This has worked fine with ckeditor4 through multiple drupal versions. However, ckeditor5 removes the ul tag, so no ToC is built.