by bengotow · 7y ago · 0 comments
- Does EditorJS support nested blocks? Eg: can I make a list node that contains a list? Can I make a list that contains a blockquote? (DraftJS is a /linear/ set of block elements, making it very difficult to model complex documents - Slate's document model is a tree which is why pretty much why I chose it over DraftJS.)
- Does EditorJS have test coverage? What's the overall testing story look like? I'm not a big TDD person, but we've had a few stability issues with Slate (granted a slightly out of date version) that cause the document state to become invalid after certain edits and then subsequent interactions throw errors. (It's absolutely terrifying to have your text editor crash!)
Regarding to your questions:
- Editor.js doesn't support nested blocks. We keep structure flat and want Tools API to be as simple as possible for new developers. The target audience of the Editor.js is media and blogs, usually you don't need complex structure there. However, you can implement some complex plugins for your needs, nested lists as example.
- We consider development of the editor very serious and understand importance of the test coverage. At the moment we don't have unit neither e2e tests but this is the one of our next steps on the way.
Thanks for your feedback!