Leftover styles from external paste are a common source of dirty data
Aliases: HTML paste · Word paste · orphaned spans
What it is
Pasting from the web, an office suite, or a messenger into rich text often brings font names, sizes, colors, leading, empty spans, and conditional comments. If the editor accepts the lot, the body embeds a paste style residue invisible under this product’s theme and explosive on export. People see “the words are in” and do not know a skin came too. The issue is how foreign markup enters the slot, not how many toolbar buttons there are, and not how headings degrade to plain text.
Why it happens
Clipboard HTML is a full layout snapshot of the source, not “pure content.” Default paste nests that snapshot in the current document: the theme font is overwritten by Calibri, links carry the source’s blue and underline rules, empty paragraphs carry 12-point space-after. Cleaning too late (at submit) means dirt cannot be seen while editing; cleaning too hard (strip everything) drops real links and lists. Residue is contagious: typing inside a residual block inherits the foreign font, so dirty data grows itself. This is not users “liking decoration”; the pipe copied the wrong layer by default.
Where it stops holding
Paste among internal documents that share a theme may want the formatting kept; cleaning hurts. A plain-text slot never accepts HTML, so residue cannot enter. “Paste as plain text” as the only option also drops structure (links); that is a dirt defense, not a structure defense. Paste from a spreadsheet entangles residue with “do we want table structure,” and needs its own table-paste policy.
Applying it
- Default paste to “structure this editor allows + this theme’s styles,” stripping foreign fonts, colors, and leading; offer a one-shot “keep source formatting” for people who need it.
- If paste was cleaned, do not do it in silence; a status such as “pasted in this editor’s format” is enough.
- New characters typed inside a residual block should inherit the theme, not the foreign span.
- Verify by pasting, from a web page and from office software, a passage with headings, links, and colored type; inspect the DOM for source fonts and empty spans. Then type at the end of the pasted block and see whether new characters follow the foreign font. If dirt remains, cleaning is not yet at the inlet.
Related
- Within the group: E2.18.1 Rich text entangles content with style, and people confuse the two · E2.18.2 A toolbar that does too much exceeds what most people use · E2.18.4 Complex formatting needs a predictable downgrade into plain text
- Adjacent: E2.07 Input masks · E2.15 File upload
- Search terms:
paste style residue·HTML paste·strip formatting