editor

Paste cleanup

What survives a paste from Word, Excel, HWP and Google Docs.

82editor looks at the clipboard HTML, works out where it came from, and cleans it per source. Adjust the result through the paste event.

SourceKeptRemoved
MS WordBold, italic, underline, colors, sizes, alignment, tables and merged cells; numbered paragraphs become real listsmso-* styles, Mso* classes, <o:p>, conditional comments
ExcelTables, merged cells, cell backgrounds, number alignmentFormatting leftovers
Hangul (HWP)pt sizes, line height, paragraph spacing, table borders and widthsRepeated font declarations, empty spans; file:/// images are dropped with a notice
Google DocsBold and italic (styles turned into tags), lists, linksThe docs-internal-guid wrapper
Web pagesParagraphs, headings, lists, links, images, tablesclass, id, scripts, tags outside the allow-list

Modes

  • pasteMode: 'clean' (default) the rules above
  • pasteMode: 'plain' text only, always
  • pasteMode: 'keep' sanitize but keep as much formatting as possible
  • Ctrl+Shift+V pastes plain text in any mode

A single pasted URL becomes a link; YouTube, Vimeo, Naver TV and Kakao TV URLs offer to embed the video.