I'm using React.js and I want to listen for any change on this div (its textContent
) with contentEditable=true
.
render() {
return (
<div contentEditable=true > Hello </div>
)
}
I'm using React.js and I want to listen for any change on this div (its textContent
) with contentEditable=true
.
render() {
return (
<div contentEditable=true > Hello </div>
)
}
Try this:
<div
contentEditable="true"
onInput={(e) => {
console.log("woohoo!");
}}>Hello</div>