Global Attributes

contenteditable="plaintext-only"

Build a form with the HTML form generator

Enables text editing without rich-text formatting. Pasted formatting is discarded; applications still need to read, validate and safely store the resulting text. Global enumerated attribute, not a Boolean attribute. Empty means true; missing or invalid inherits. Use a labeled textarea for ordinary form text when possible.

Formal Syntax & Structure

html syntaxhtml
contenteditable="plaintext-only"

Parameters & Attributes

NameTypeDescription
contenteditablekeywordEnables text editing without rich-text formatting. Pasted formatting is discarded; applications still need to read, validate and safely store the resulting text.

Working Example

Example Snippethtml
<p id="label">Editable note</p><div role="textbox" aria-labelledby="label" contenteditable="plaintext-only">Edit this note.</div>

Browser Compatibility

Minimum supported versions across modern rendering engines

Widely Available (2025)
Blink
Chrome
51
Yes
EdgeHTML / Blink
Edge
12
Yes
Gecko
Firefox
136
Yes
WebKit
Safari
5
Yes
Plain-text editing became interoperable on March 4, 2025. Chrome has a known white-space behavior difference; this is not a guarantee of identical editing behavior.
HTML Living Standard
HTML Reference