27 ms·
Neat, but. I once had to do extensive testing of a rich text editor and know where the most bugs were? un-ordered lists. The world has been trained to expect a
by iandanforth 11y ago
Neat, but. I once had to do extensive testing of a rich text editor and know where the most bugs were? un-ordered lists. The world has been trained to expect a very specific set of behavior from bulleted lists by MS Word and it's really tricky to emulate. Specifically, how do tab and shift-tab modify the list? If you have an indented bullet, and hit return from the end of the line, what happens? What if the previous line was bold? What if I select most of two lines and hit delete?
Their demo falls far short of expected functionality which makes me think that there is a huge amount of work to go from this library to a working editor.
- bshimmin 11y agoThe docs do mention nested lists (http://facebook.github.io/draft-js/docs/advanced-topics-nested-lists.html#content http://facebook.github.io/draft-js/docs/advanced-topics-nest...) but this doesn't seem to work for me in the demo. I agree that lists in web-based rich text editors, versus the de facto standard of Word, are a major problem, and I suspect they fall into that "unglamorous" area of development that people don't want to delve too deeply into.
- sime 11y agoThe docs discuss lists and reference Facebook Notes which uses Draft. The demo doesn't support the nested lists but Notes does. I've tried it out and it supports tab and shift-tab. The only limitation seems to be that you can't select multiple items and indent them together - it has to be one at a time. I'm unsure if that's a limitation of Draft though.
- spicyj 11y agoThe default behavior for tab is defined here: https://github.com/facebook/draft-js/blob/f5e6cf50558f5797b079db80fcda706664c74e14/src/model/modifier/RichTextEditorUtil.js#L229 https://github.com/facebook/draft-js/blob/f5e6cf50558f5797b0... It would be easy to override it in your own component or send a PR upstream to make it adjust multiple blocks at once.
- spicyj 11y agoIf you could file issues for behavior issues you notice, that would be valuable and help everyone who ends up using the editor.