How would I make it so the content of an element could be made editable through native JavaScript (DOM) and/or jQuery?
How would I make it so the content of an element could be made editable through native JavaScript (DOM) and/or jQuery?
All we have to do is set the contenteditable attribute on nearly any HTML element to make it editable.
Here's a simple example which creates a element whose contents the user can edit.
<div contenteditable="true">
This text can be edited by the user.
</div>