Scenario

Plain text paste and plaintext-only contenteditable

Rich paste into contenteditable pulls in unwanted HTML; users expect paste-as-plain-text or plaintext-only modes. Browsers differ on clipboard APIs, execCommand, and how NBSP and whitespace survive—breaking layout when editors assume 'plain' means U+0020 only.

clipboard
Scenario ID
scenario-paste-plain-text

Details

Rich paste into contenteditable pulls in unwanted HTML; users expect paste-as-plain-text or plaintext-only modes. Browsers differ on clipboard APIs, execCommand, and how NBSP and whitespace survive—breaking layout when editors assume “plain” means U+0020 only.

Problem Overview

contenteditable="plaintext-only" (where supported) reduces rich paste but has compatibility limits; manual stripping via clipboardData.getData('text/plain') must still normalize spaces.

Observed Behavior

  • Safari / Word: styled HTML on paste unless intercepted.
  • plaintext-only + NBSP: line layout can break (see related cases).

Impact

Unexpected bold/color in “simple” fields; subtle layout bugs from non-breaking spaces.

References

Scenario flow

Visual view of how this scenario connects to its concrete cases and environments. Nodes can be dragged and clicked.

React Flow mini map

Variants

Each row is a concrete case for this scenario, with a dedicated document and playground.

Case OS Device Browser Keyboard Status
ce-0019-paste-plain-text-only macOS Ubuntu 22.04 Desktop or Laptop Any Safari 120.0 US draft
ce-0572 Linux Ubuntu 22.04 Desktop Any Chrome 121.0 US QWERTY confirmed

Browser compatibility

This matrix shows which browser and OS combinations have documented cases for this scenario. Click on a cell to view the specific case.

Browser Linux macOS
Chrome
ce-0572
121.0
Safari
Confirmed
Draft
No case documented

Cases

This scenario affects multiple languages. Cases are grouped by language/input method below.

US

1 case

US QWERTY

1 case

Related Scenarios

Other scenarios that share similar tags or category.

Tags: paste, clipboard

Clipboard and paste behavior in Edge on Linux

Edge on Linux (Chromium-based) can differ from Windows Edge for clipboard MIME types, file paste, and integration with Wayland clipboard—paste into contenteditable may drop images or format differently.

1 case
Tags: paste

Trailing and leading whitespace on paste

Firefox and other browsers may preserve or normalize trailing newlines and spaces differently when pasting plain text—collaborative editors and diffs see unexpected whitespace changes.

1 case

Comments & Discussion

Have questions, suggestions, or want to share your experience? Join the discussion below.