Search code examples
reactjscontenteditable

React.JS - Manage content of contenteditable div as React components


I'm looking for methods of managing elements of contenteditable as React components.

Exploring Facebook's source via React DevTools extension reveals that they wrote a contenteditable comment editor that seems to be fully managed by React.

enter image description here

You can see in the components tree that updating the conteneditable triggers updates to components tree that are children of contenteditable.


Solution

  • Facebook just released Draft.js - https://facebook.github.io/draft-js/