Scenario

Pasting rich text into contenteditable strips markup unexpectedly

When pasting content from a rich text source into a contenteditable element, the resulting DOM loses headings, lists, or inline formatting that were present in the source.

paste
Scenario ID
scenario-paste-formatting-loss

Details

When pasting content from a rich text source (such as a word processor or a web page) into a contenteditable element, the resulting DOM loses headings, lists, or inline formatting that were present in the source.

This scenario has been observed in multiple environments with similar behavior.

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-0006-paste-strips-markup Windows 11 Desktop or Laptop Any Chrome 120.0 US draft
ce-0024-paste-html-preserved macOS Ubuntu 22.04 Desktop or Laptop Any Safari 120.0 US draft
ce-0039-paste-table-structure-lost Windows 11 Desktop or Laptop Any Firefox 120.0 US draft

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 Windows macOS
Chrome
Firefox
Safari
Confirmed
Draft
No case documented

Cases

Open a case to see the detailed description and its dedicated playground.

Related Scenarios

Other scenarios that share similar tags or category.

Tags: paste, clipboard

Clipboard API paste does not work in contenteditable

When using the Clipboard API (navigator.clipboard.readText() or navigator.clipboard.read()) to programmatically paste content into a contenteditable region, the paste operation may fail or not work as expected.

2 cases
Tags: paste, clipboard

Link pasting behavior differs across browsers

When pasting links into contenteditable elements, different browsers handle the link data differently. Some browsers paste only the URL, while others preserve the link title and HTML structure.

1 case

Comments & Discussion

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