Allow mixing UL and OL when nesting
jmfederico opened this issue · comments
This is a bug report.
Current behavior
When changing the list type of a nested list between ol and ul, the new type of list will break from its parent, and create a new list without nesting.
Expected behavior
Changing the type of list for a nested list should keep it as nested.
Using WagTail 2.6.1
Hey @jmfederico, thanks for reporting this.
I think it might be possible to implement what you’re suggesting but I’m not entirely sure. I think the problem here is that the editor and content conversion to HTML need a way to tell where a list starts and when it ends.
Could you provide examples of other editors that work as you expect? Ideally from the list here: https://github.com/springload/draftail/blob/master/docs/CONTRIBUTING.md#discussing-the-editors-behavior
Edit: tagging this as an enhancement – I don’t think the current behavior of the editor suggests in that it’s meant to work as you expect but is broken. From an implementation perspective the current behavior is also completely intentional.