News for hackers. Stuff that matters.
Re:Draft.js – Rich Text Editor Framework for React by danabramov on Monday February 22, 2016 @03:33PM (#11154061)
I just tried that in http://facebook.github.io/draft-js/, and Edit -> Undo worked for me.
Re:Draft.js – Rich Text Editor Framework for React by ridiculous_fish on Monday February 22, 2016 @03:47PM (#11154176)
Hmm, what were your steps where it worked?

Undo and other text editing facilities aren't completely nonfunctional, they just become broken and unpredictable. For example, these steps:

1. Load http://facebook.github.io/draft-js/ 2. Click in the text box 3. Type 'hello' on the keyboard 4. Using the mouse, choose Edit -> Undo

The text box will show "h" instead of being empty. Do you see this too?

Note that cmd-Z won't reproduce this since the page tries to handle that itself to work around these bugs.

Re:Draft.js – Rich Text Editor Framework for React by danabramov on Monday February 22, 2016 @04:13PM (#11154343)
Good catch. Maybe worth filing an issue?
Re:Draft.js – Rich Text Editor Framework for React by the_mitsuhiko on Monday February 22, 2016 @07:20PM (#11155455)
Against what? Html5? ;)
Re:Draft.js – Rich Text Editor Framework for React by Reinmar on Tuesday February 23, 2016 @07:37AM (#11158443)
Well... yes :D [1] (AFAIR this case is covered by [2]).

The Editing Task Force is working on opening necessary APIs so editor implementors could integrate with all the native features. I wrote an article about the effort [3]. It's a bit outdated now, but explains what are the goals.

[1] https://github.com/w3c/editing/issues

[2] https://github.com/w3c/editing/issues/79

[3] https://medium.com/content-uneditable/fixing-contenteditable...

Re:Draft.js – Rich Text Editor Framework for React by eloisant on Monday February 22, 2016 @04:43PM (#11154516)
It surely does, because it's a crucial feature for a text editor, but the developers had to implement and undo/redo stack in their lib.

Anyway this approach is the only good one if you don't want to produce crappy HTML that will end up on your site. TinyMCE and the rest are obsolete, and editors like DraftJS or mobiledoc-kit are the only viable solutions until browsers offer a new, not broken alternative to content-editable.