-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Should it be possible to create two sublists in one item? #2971
Comments
Two solutions:
I'm more for the 2nd solution. |
Note: Whichever way we go, I think that we'll need to have a post-fixer or something because there may be more ways to create such a lists than by changing the type of one of the items. |
This is a feature :(. I put a lot of effort to enable this. |
I thought so. But it really doesn't seem to be necessary. At least to me. cc @fredck and @oleq and @Comandeer. |
Even if possible, I think that two subsequent lists (of any type) in a nested item make little sense. Nested items are to visualize the hierarchy, and the case that you presented isn't one. You can create one list after another at the 0-level (top paragraph-level) because they don't share any root, they can visualize some different data. But such structure in a nested item feels like a nonsense to me. |
Sorry to say this, @scofalik, but this feature sounds like useless/pointless. I'm all for changing it, especially if this means cleaning up our code :) |
Waiting for a PR removing 1000LOC :D |
I'm glad you like the feature . . . |
I think that quoted solution is better, since it is:
I'll try to go this way. Anyway, fun fact: I said that it I did it on purpose like this and I put some work into it. The thing is that the way converters work now is very convenient for this "feature". Mostly what remove/change indent/change type converters do is:
I could easily force this solution without even touching converters much or at all. Post-fixer will change wrong type (and trigger conversion). EDIT: Removing needs to be post fixed with this solution - you could have a selection spanning over two different nested lists:
|
I think that insertion needs to be post-fixed too – you shouldn't be able to paste ul in a middle of ol. |
EDIT: I've just seen https://github.com/ckeditor/ckeditor5-list/issues/48. |
Oh, sorry, I thought that I wrote something earlier but I didn't :). ckeditor/ckeditor5-list#48 is unrelated. I thought that I already wrote that insertion will have to be handled but I wrote only this:
Of course insert also have to be fixed (and move too). |
Feature: Added support for nested lists. These changes close a wide range of issues. Closes #8. Closes #9. Closes #30. Closes #36. Closes #37. Closes #38. Closes #39. Closes #40. Closes #41. Closes #44. Closes #45.
It's now possible to create such content:
It's also possible to create such content in CKEditor 4. The process is the same way – just create a sub list with two items and convert one of them to a different type.
Fun fact – it makes CKEditor 4 very unstable (e.g. backspacing around these list items), so I guess it just wasn't anticipated.
CKEditor 5 is actually handling this quite well, but I'm not sure that this is the kind of a list that you should be able to achieve.
The text was updated successfully, but these errors were encountered: