Support nestedlist NestedList 😀
Purpose
- Bug fix
Description
In my Editor.js instance (installed through dimitrov-adrian/directus-extension-editorjs-interface NestedList is passed to blocks as nestedlist, not as list.
This might be problem in above project, as it support both list (deprecated) and nestedlist feature. I don't know enough to decide which approach is correct.
Possible solution
I has been able to work around this easily (at least in the end :) ) with your custom renderers by simply using your ListBlock to render nestedlist. IMHO it would be great if you would do this by default. I tried to create PR, but hasn't been able to get it working.
Feel free to close this as won't fix if this is result of non-standard approach in directus-extension-editorjs-interface.
Hi @kepi, thank you for your comment 😄
The Editor.js team already provides an official plugin to add nested lists that we support, but I haven't had time to identify the differences between them and the one that you provided.
As you pointed out, the purpose of custom renderers is to give you the flexibility to plug in whatever renderers you want to apply or even replace. That said, I'm not entirely a fan of supporting every plugin out there, so unless you convince me otherwise, I can't see this being added to the core.
@kepi the directus plugin uses the nestedList as default but has also the option to enable the legacy list. You can do that in the settings for the field in directus and add the legacy list to it.
@lightningspirit you said you already support nested list plugin? I couldn't find any render in this repo for nestedList blocks?
@SimonHausdorf yes, I know. I wanted to use nestedlist. Legacy one is working just fine.
nested list is supported in this plugin by default with list. From what @lightningspirit wrote I understand that in official editor.js nestedlist is simply list. And directus plugin made little mess in this by supporting legacy and new (renamed) version. If it is so, IMHO this should be closed as wontfix and we should open issue with directus plugin or simply leave it as is and use custom plugins.
I understand you don't want support everything. It might be worth to support similar use cases with something like aliases support, but I don't feel I know enough to advocate for this.
Thanks
I do agree that we should open an issue with the directus plugin maker to render the nestedList as list block and to remove the list legacy if possible. I am just not sure if the plugin is still maintained :/