React.js Conf 2016 - Isaac Salier-Hellendag - Rich Text Editing with React
Why Stack Overflow recommends it
Stack Overflow users link it when answering questions about contentEditable and rich text input, to explain why Facebook built Draft.js and how it controls the editor in React.
Recommended by 3 people across 3 different months, 2016 to 2021.
What it is
A React.js Conf 2016 talk by Isaac Salier-Hellendag of Facebook on how the team built Draft.js, a rich text editor framework using React, ImmutableJS and contentEditable. It covers why raw contentEditable is hard to work with and how an editor framework lets product teams add mentions, emoticons, hashtags and embedded media.
What people said
Recommends Jeremy Iglehart · 2016-08 · Stack Overflow · on “How does Twitter implement its Tweet Box?”
This is not a direct answer with source code building the part of your application to your spec. This is really not an easy thing to do. You're right - the way to solving this problem is to use a contenteditable="true" container. But I'm afraid that from there it gets much much more complicated [this video] . Enter DraftJS - A javascript solution to rich-text editing which does most of the heavy lifting for you. Both of my solutions below require the use of both React and DraftJS The Plug-&-Play Solution: The React + DraftJS + Someone Else's "Plugin" solution is already here. You can check out draft-js-plugins.com [LINK] . And here's the Github source code [LINK] . Personally, I wouldn't go this
Recommends Chintan Palan · 2020-04 · Stack Overflow · on “Want to move cursor across multiple content editable divs depending on keypress”
I had to drop that feature due to timeline but did find a direction with which this was possible. This is a video to explain the working and idea behind Draft.js (Built by the team at Facebook) [this video] It provides an overall way to solve the problem that we are facing above, to control the content-editable in React JS.
Recommends Chintan Palan · 2020-04 · Stack Overflow · on “Want to move cursor across multiple content editable divs depending on keypress”
Hey @SpiritOfDragon, I had to drop that feature due to timeline but did find a direction with which this was possible. This is a video to explain the working and idea behind Draft.js (Built by team at Facebook) [this video]
Recommends Lukas Liesis · 2021-12 · Stack Overflow · on “Selecting all text in HTML text input when clicked”
FYI, `contenteditable` could go very wrong in some scenarios. If scenario is basic, you should get away with just `contenteditable` Can learn more from ReactJS talk why FB created DraftJs. [this video]