Skip to content
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

Allow mixing UL and OL when nesting #209

Open
jmfederico opened this issue Sep 1, 2019 · 2 comments
Open

Allow mixing UL and OL when nesting #209

jmfederico opened this issue Sep 1, 2019 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@jmfederico
Copy link

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.

  1. unordered list with nested unordered list
    1
  2. nested unordered list changed to ordered list
    3

Expected behavior

Changing the type of list for a nested list should keep it as nested.

Using WagTail 2.6.1

@thibaudcolas
Copy link
Collaborator

thibaudcolas commented Sep 2, 2019

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.

@thibaudcolas thibaudcolas added the enhancement New feature or request label Sep 2, 2019
@thibaudcolas thibaudcolas added this to the Nice to have milestone Sep 2, 2019
@jmfederico
Copy link
Author

From the list of provided editors:

No nesting

  • Slate, does not allow nesting.

Nests incorrectly

These allow for mixed nesting, but reset the counter when un-nesting.

  • Quill
    quill

  • Dropbox Paper
    dropbox-paper

Work as expected

  • TinyMCE
    tinymce

  • Github
    github

  • Google Docs
    google-docs

  • Pages
    pages

  • CKEditor
    ckeditor

  • Word
    word

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants