About the State Management of a Contenteditable Element in React

Controlled input, onInput event, e.target.innerHTML, and more

Photo by Monika Guzikowska on Unsplash

In HTML, elements can be editable. By doing so the web page can be transformed into a rich text editor. Set the contenteditable attribute on an HTML element to make it editable.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store