K2.10.2clipboard format negotiationdesignresearch

Copied formats determine what the paste target can accept

Aliases: pasteboard types · clipboard flavors · paste compatibility

What it is

The source puts HTML, rich text, plain text, and an image on the clipboard; the target only knows plain text, so paste arrives as words. Clipboard format negotiation means a copy is not one thing but a set of representations. The target takes the richest kind it can eat; if none match, paste is empty, garbage, or wearing the source’s styles. Whether the channel’s behavior is predictable is a different claim. This entry is only how that set of representations decides “it pastes,” “it looks like the source,” and “it lands clean.”

Why it happens

The system clipboard is multi-slot: one logical payload can register several types (plain text, RTF, HTML, file URL, private object). The target walks its own list from rich to poor. If the source registers only a private object, nobody else can paste. If it registers only rich text, a plain editor either refuses or swallows control characters. If it registers all three, the target can still pick the wrong slot—some editors paste HTML by default and drag the source’s fonts, colors, and tracked changes into a draft that was supposed to be words. Negotiation failure looks like “copy is broken.” The channel is open; the two ends have no intersection, or the intersection is not the layer people wanted. Drag-and-drop also declares types, but the drag can still bargain with target highlighting. Clipboard negotiation happens after people have already switched windows; there is no second choice.

Studying it

Hold the content fixed, vary the type set the source registers and the set the target accepts, and inspect the paste. Use “paste and match style” as a control.

Independent variables: types the source registers (rich only / rich+plain / private object only), the target’s accept set, whether an explicit “paste text only” command exists. Dependent variables: paste success, whether source styles arrive, whether people blame copy or paste, rate of switching to paste-as-text.

“Something appeared” as the only metric hides style pollution: the words are there, the layer is wrong. Code “has content” separately from “the layer fits the target’s situation.” Type names are not interchangeable across operating systems; report cross-platform conclusions per system.

Where it stops holding

When both ends are the same app, a private object is an advantage, not a barrier; negotiation can use an internal type. Plain terminals and code editors treat “with style” as pollution; compatibility should prefer the poor layer. Images and file references are not a rung on the text ladder but another type branch: if the target does not declare image, registering one does nothing. Web copy often carries a thick HTML shell; what looks like words on the desktop is structured markup, and a target that eats HTML will paste tables and leftover script.

Applying it

  • On copy, register at least the poor representation the target population actually uses (usually plain text) and the rich one that needs fidelity; do not ship only a private object.
  • Offer “paste and match style / paste text only” so people have an explicit fallback when negotiation picks the wrong slot; do not rely only on the target’s default pick.
  • As a target, declare types you can actually handle; if you do not understand the rich format, take plain text rather than painting control characters or broken HTML into the body.
  • Verify: copy a styled passage from a page and paste into a plain field, a rich draft, and a canvas that only accepts images. The plain field should have no tags and no color; the canvas should fail clearly if it is not an image, not ingest a junk URL. Any “some windows paste, some do nothing” must list the type intersection at both ends.

Related

  • Within the group: K2.10.1 The clipboard is an implicit inter-app channel whose behavior must be predictable · K2.10.3 System services let other apps invoke a function without switching · K2.10.4 Clipboard history and cloud sync widen the leak radius of secrets
  • Adjacent: K2.05 Cross-application Drag and Drop · K1.07 System Share Sheet
  • Search terms: clipboard formats · pasteboard · paste and match style

Cards in the same group

Quick Actions

Share

Share this page

ios_share

https://hci.top/en/handbook/K2.10.2