Allow the user to edit text on the page

Published on: Saturday, 16.03.2024

Using the 'contenteditable' attribute indicates if the given element should be editable by the user. We can assign it a boolean value, an empty string which equals to true or 'plaintext-only' to indicate that the raw text is editable, but not the rich text formatting.

<p contenteditable="true"></p>