News for hackers. Stuff that matters.
Re:Draft.js – Rich Text Editor Framework for React by iandanforth on Monday February 22, 2016 @04:54PM (#11154575)
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.

Re:Draft.js – Rich Text Editor Framework for React by bshimmin on Tuesday February 23, 2016 @02:02AM (#11157111)
The docs do mention nested lists (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.

Re:Draft.js – Rich Text Editor Framework for React by sime on Tuesday February 23, 2016 @06:31AM (#11158114)
The 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.
Re:Draft.js – Rich Text Editor Framework for React by spicyj on Tuesday February 23, 2016 @01:21PM (#11161012)
The default behavior for tab is defined here:

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.

Re:Draft.js – Rich Text Editor Framework for React by spicyj on Tuesday February 23, 2016 @01:22PM (#11161023)
If you could file issues for behavior issues you notice, that would be valuable and help everyone who ends up using the editor.