μΌ€μ΄μŠ€ ce-0024 Β· μ‹œλ‚˜λ¦¬μ˜€ scenario-paste-formatting-loss

Pasting rich text preserves unwanted HTML structure

OS: macOS Ubuntu 22.04 κΈ°κΈ°: Desktop or Laptop Any λΈŒλΌμš°μ €: Safari 120.0 ν‚€λ³΄λ“œ: US μ΄ˆμ•ˆ
pasteformattinghtmlsafari

이 νŽ˜μ΄μ§€λŠ” 아직 λ²ˆμ—­λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€

ν˜„μž¬ μ˜μ–΄ 원문을 ν‘œμ‹œν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. λ²ˆμ—­μ— κΈ°μ—¬ν•΄ μ£Όμ‹œλ©΄ κ°μ‚¬ν•˜κ² μŠ΅λ‹ˆλ‹€.

Phenomenon

When pasting content from external sources (like Word documents or web pages) into a contenteditable region in Safari, the HTML structure is preserved, including unwanted elements like <span> tags with inline styles, <div> elements, and other formatting markup.

Reproduction example

  1. Copy formatted text from a Word document or web page.
  2. Paste it into a contenteditable div in Safari.
  3. Inspect the DOM structure of the pasted content.

Observed behavior

  • Safari preserves the full HTML structure from the source.
  • Unwanted elements like <span style="...">, <div>, and other formatting tags are included.
  • The pasted content may have inconsistent styling.

Expected behavior

  • The paste operation should normalize or clean the HTML structure.
  • Or, there should be a way to control what gets pasted (plain text vs. formatted).

이 μ‹œλ‚˜λ¦¬μ˜€μ˜ λ³€ν˜•

μΌ€μ΄μŠ€ OS λΈŒλΌμš°μ € μƒνƒœ
ce-0006 Windows 11 Chrome 120.0 μ΄ˆμ•ˆ
ce-0024 macOS Ubuntu 22.04 Safari 120.0 μ΄ˆμ•ˆ
ce-0039 Windows 11 Firefox 120.0 μ΄ˆμ•ˆ

Playground for this case

Use the reported environment as a reference and record what happens in your environment while interacting with the editable area.

Reported environment
OS: macOS Ubuntu 22.04
Device: Desktop or Laptop Any
Browser: Safari 120.0
Keyboard: US
Your environment

Use this editable area to reproduce the described case.

Event log
Use this log together with the case description when filing or updating an issue.
0 events
Interact with the editable area to see events here.