How to make editable div or paragraph by double clicking?

I want to make a simple div which has to become editable when a user double-clicks on it. I wish div to turn into element like text field with cursor to the text where double-click event occurred. Moreover, I want it to turn back into <div> after pressing Enter button. How to hack it?

»Javascript @ahsafudari

» No answer  » 14 views   1 like

Add photos

Back to top

Posted under this donnektish »
This community is about sharing contents such as questions and answers discussing about Javascript and TypeScript, ES5, ES6
58 people joined this donnektish

Maintain social distancing, to avoid Covid19