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

前端 未结 2 1654
鱼传尺愫
鱼传尺愫 2021-02-14 02:06

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

Exploring Facebook\'s source via React DevTools extension reveals that

相关标签:
2条回答
  • 2021-02-14 02:55

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

    0 讨论(0)
  • update:

    Facebook has released draft-js which is meant for building text editors with react. https://github.com/facebook/draft-js

    original answer which is now outdated:

    Go ahead, there is nothing special for this.

    here are some examples:

    • https://github.com/lovasoa/react-contenteditable
    • https://github.com/liamzebedee/reactjs-contenteditable/blob/master/ContentEditable.jsx
    • https://stackoverflow.com/a/22678516/1536309
    0 讨论(0)
提交回复
热议问题