lovasoa / react-contenteditable

React component for a div with editable contents
http://npmjs.com/package/react-contenteditable
Apache License 2.0
1.64k stars 218 forks source link

onSelect event #216

Open shenwu1989 opened 3 years ago

shenwu1989 commented 3 years ago

The onSelect event, the paste HTML will fire the onSelect event all the time, and editing the HTML content again will fire the onSelect event all the time, only the plain text will execute properly

lovasoa commented 3 years ago

Is this a bug report ? If so, please give a reproducible example code, the steps to reproduce the issue, the expected behavior and the actual behavior.

shenwu1989 commented 3 years ago

这是错误报告吗?如果是这样,请提供可复制的示例代码,重现问题的步骤,预期的行为和实际的行为。

https://codesandbox.io/s/simple-rich-text-editor-in-react-forked-jklh2?file=/src/index.js