我正在尝试在无状态 React 组件中实现一个 contenteditable div。
我不断收到以下警告:
warning.js:36 Warning: A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.
我该如何解决这个问题?
另外,如何在更改时读取 div 的内容?
最佳答案
将 suppressContentEditableWarning="true"
添加到 contenteditable div。
关于javascript - 在无状态组件中 react contenteditable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44641201/