[EDIT: Just for reference, the title originally was 'the right way to content manage..'] I'd maybe call this "an" approach, rather than the 'right' approach :) Already, prosemirror has provided a solid alternative, with things like custom-schemas, which ensure we're no longer in contenteditable-copy/paste hell. There's substance.io and quilljs as well. Any of these could be the right approach for a particular CMS pro…
I just came here to write that I think this is THE right approach for wysiwyg editor. Having a full model of the document tree rather and working from that rather than sanitizing `contenteditable`. I expect this approach to automatically solve many problems that other wysiwyg editors have.
React Draft Wysiwyg
21–30 of 45 posts
Re: React Draft Wysiwyg
#22Looks very nice, thanks for the work. I've been tinkering with Draft off and on for quite some time and I love how powerful it is, however documentation was rather lacking in some areas and this project would definitely help me understand some of the things about Draft. Too bad there's still only a workaround for block styles (as in setting "style" prop on a whole block instead of using setBlockData method).
Re: React Draft Wysiwyg
#23One important thing seems to be missing though: collaborative editing. (A requirement on the modern web, since you don't want to edit a file only to find out that your version was overwritten by another person who happened to be editing at the same time).
It can be made collaborative. Depends on how you integrate it in your application.
Re: React Draft Wysiwyg
#24Re: React Draft Wysiwyg
#25One important thing seems to be missing though: collaborative editing. (A requirement on the modern web, since you don't want to edit a file only to find out that your version was overwritten by another person who happened to be editing at the same time).
Hi, It can be made collaborative. Depends on how you integrate it in your application.
Re: React Draft Wysiwyg
#26Re: React Draft Wysiwyg
#27Does anyone else notice a tiny typing lag? I can't point to it, but whenever I type with a delayed response it feels as though I'm slogging through muddy ground, an almost subliminal sensation.
Re: React Draft Wysiwyg
#28Re: React Draft Wysiwyg
#29Earlier quoted context omitted.
I just came here to write that I think this is THE right approach for wysiwyg editor. Having a full model of the document tree rather and working from that rather than sanitizing `contenteditable`. I expect this approach to automatically solve many problems that other wysiwyg editors have.
Prosemirror still uses contenteditable under the hood though. I actually wonder why that is the case.
P.S. I also came into this thread to endorse Prosemirror.
Re: React Draft Wysiwyg
#30Does anyone else notice a tiny typing lag? I can't point to it, but whenever I type with a delayed response it feels as though I'm slogging through muddy ground, an almost subliminal sensation.
A more noticeable thing is that if you select some text and then Bold / Italics / Underscore, etc. there is a flash where the text appears to be no selected and then becomes selected again.
Given this is React, my guess of what is going on is that the rich text is redrawn when these buttons are pressed (and perhaps even on each keystroke) and the selection has to be re-applied in code.
Perhaps they can improve this, but this is why I think it's important to stay away from high level frameworks for doing low-level things like text editing. Use your high level framework for application architecture and all that good stuff, but when something has to be fast, drop down to the lowest level you have.