-
Notifications
You must be signed in to change notification settings - Fork 48
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
List Tool 2.0 #75
Comments
I think merging List and NestedList is a very good idea. I think it's worth considering whether the checklist should also be a part of it. From a programming point of view, there are certainly synergies. On the other hand, the checklist becomes part of the additional code. From the user's point of view, they are all lists. But you can also argue that checklists are a different kind of list. Maybe typescript would be a nice thing for the plugin. |
@Sozialarchiv could you explain it? Are there any disadvantages from the end user perspective? |
I assume that there would only be menu entry "List" in the add menu. I asked whether the checklist would then be easily overlooked. But maybe it's just a matter of getting used to it. From my point of view, it would perhaps be good if you could deactivate the checklist. |
List tool can export several entries at the toolbox |
Great. Then I take the argument back. :) |
We currently have a feature request to support nested lists in our product, so we are considering supporting this nested list block. Is there any timeframe for the merge described in this issue? We need to know if we should wait or not. Also, what is the thinking behind using |
I would suggest a step-by-step approach so that the improvements reach users in the foreseeable future:
|
I can confirm that of those four points, the first point would unblock us (with the caveat that I haven't looked at the open bug issues). However, I would like to know more about the point I made regarding the |
I agree that this is an important point. I also see the point you have made here: #15 (comment)
However, I am not sure whether a new type name is really necessary. list and nested-list have been using the same type (list) for a long time. This means that parsers have already had to implement a distinction in the past. In addition checklist could be integrated relatively easily into the data structure of nested-list, without breaking it. Here an suggestion: current: {
"type" : "list",
"data" : {
"style" : "unordered",
"items" : [
{
"content": "Apples",
"items": [
{
"content": "Red",
"items": []
},
{
"content": "Green",
"items": []
},
]
},
{
"content": "Bananas",
"items": [
{
"content": "Yellow",
"items": []
},
]
},
]
}
} suggestion {
"type" : "list",
"data" : {
"items" : [
{
"content": "Apples",
"checked" : true
"items": [
{
"content": "Red",
"checked" : false
"items": []
},
{
"content": "Green",
"checked" : true
"items": []
},
]
},
{
"content": "Bananas",
"items": [
{
"checked" : true
"content": "Yellow",
"items": []
},
]
},
]
}
} What is not quite clear to me is how you would make sure that the plugin also reads the existing blocks with type checklist. Would you load the plugin for both the type list and the type checklist? But wouldn't the menu entries then appear twice? Or is there a more user-friendly way? |
We have already started. As always you can support development on Open Collective, it will increase the development speed.
Actually, tools do not care about the 'type' fields. What remains is on the user side; you can use any type you want by specifying the corresponding key in the tools parameter of the editor config. import EditorJS from '@editorjs/editorjs';
import NestedList from '@editorjs/nested-list';
const editor = EditorJS({
// ...
tools: {
...
myListToolType: NestedList
},
}); |
That is true. But most plugins give an example with a type name. This example name is used by the most of parsers. That is imho why the question of @cmeeren is relevant. But imho I think we should give list as type example and provide data compatibly to (unnested) list and checklist. |
The new List tool should support old formats, that's true. But your backend should adopt the new format too. |
Thank you for hearing me out!
While the existence of 3rd party parser implementations of the nested list tool depends on on how popular it is and the contexts in which it is used, I agree with the underlying sentiment that preserving backward compatibility is important.
I agree that given nested lists's format, it is simple to implement additional per-node data such as a checked state. To be clear, I never argued against nested list's format per se. I was merely arguing for using a different value than
Thank you. I did not mean to request that development be sped up for our sake. To be more specific, I was just wondering if the timeframe of a new, stable format is likely closer to a week, a month or a year away. That information will help us decide on the path forward.
Thank you for this clarification, I did not know this. I will have to weigh the pros and cons of a non-standard |
I am a new user of Editor.js. In the process of using it, I also found some shortcomings with List/NestedList/CheckList. I am very touched that someone is trying to update this important plugin. During my use, I encountered the following problem. When I use EditorJS with the editorjs-drag-drop plugin, I hope to change the order of blocks by dragging the setting-button. At this time, the subitems of NestedList cannot be dragged because they do not have a setting-button. If I want to solve this issue, where can I start? |
We're gonna improve list creation experience:
Steps
maxLevel
config option)defaultStyle
config option Tools Icon #70The text was updated successfully, but these errors were encountered: