Opened 10 years ago
Last modified 8 years ago
#12274 confirmed Bug
Bulleted/numbered list applied to description list breaks HTML
Reported by: | Piotrek Koszuliński | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
- Use source (remember about ACF):
<dl><dt>Foo</dt><dd>bar</dd></dl>
- Make selection in "Foo".
- Apply bulleted list.
Expected:
<ul><li>Foo</li></ul><dl><dd>bar</dd></dl>
Actual:
<dl><ul><li>Foo</li></ul><dd>bar</dd></dl>
Change History (3)
comment:1 Changed 10 years ago by
Owner: | set to Piotrek Koszuliński |
---|---|
Status: | new → assigned |
comment:2 Changed 10 years ago by
Milestone: | CKEditor 4.4.4 |
---|---|
Owner: | Piotrek Koszuliński deleted |
Status: | assigned → confirmed |
I pushed some tests into branch:t/12274.
Unfortunately, description list is a special kind of structure which is similar only to ul and ol lists. It requires a wrapper that can contain only specific elements thus must be correctly handled (including splitting and removing emptied fragments, etc.). There's no other example and therefore list plugin does not expect this situation to happen. I looked into the code and from what I saw it will need a lot of changes and very deep analysis. Tests showed also that at least two parts of algorithm are broken.
Workaround for this issue is to remove description list before applying other list. This can be done by listening on list commands' exec events. I plan to implement this workaround in my description list plugin (https://github.com/Reinmar/ckeditor-descriptionlist) because it's much, much simpler.