ClipboardFormat
Cross-platform identifier for a clipboard payload. The canonical identifier is a MIME-style string (text/plain, text/html, text/uri-list); each platform clipboard provider translates to the correct OS-level identifier at the boundary (UTI on Apple, CF_HTML / "HTML Format" on Windows, MIME on Web / Android / Linux).
Remarks
PlainText, Html, Url, Markdown, UniTextSource, and the raster image trio (Png / Jpeg / Gif); integrator formats go through Custom. RTF / RTFD remain reserved (decision D-005) and land without breaking this contract. Per-platform support is summarised on UniTextClipboard. Equality and hash are by Identifier only — provider implementations compare formats via format == ClipboardFormat.Html, not by reference.Detects a raster image format from a payload's leading bytes by file signature (magic number) — the content-based identification browsers and file managers use, since a file extension lies or is absent (a pasted path may be a sandbox or content:// URI with none). Recognises Png, Jpeg, and Gif; pass at least the first 8 bytes. Returns on any other or truncated input.
public static ClipboardFormat Custom()Integrator-defined format. identifier is passed verbatim to the native channel (Win32 registered format, Apple UTI, Android MIME, Chromium custom format with auto-applied web prefix). Use the vendor MIME tree (application/vnd.<vendor>.<type>) for cross-platform safety.
public static readonly ClipboardFormat PlainTextUTF-8 plain text (text/plain). Apple UTI: public.utf8-plain-text. Windows: CF_UNICODETEXT.
public static readonly ClipboardFormat HtmlHTML fragment with optional source-URL header (text/html). Apple UTI: public.html. Windows: CF_HTML ("HTML Format").
public static readonly ClipboardFormat UrlURI list, one URL per line, LF-separated (text/uri-list). Apple UTI: public.url. Windows: UniformResourceLocatorW.
public static readonly ClipboardFormat MarkdownCommonMark-style markdown source (text/markdown, RFC 7763). On Chromium browsers the Web Async Clipboard API delivers this via the web text/markdown custom format; Firefox / Safari clipboard support is not yet shipping it natively. On Apple platforms the canonical identifier is exposed as the dynamic UTI net.daringfireball.markdown by some apps — UniText negotiates the active identifier at the platform boundary; integrators consume / produce Markdown through this same constant. Used by chat composers and editor apps to preserve source markdown across copy / paste (Slack, Discord, Notion, Obsidian, Typora, VS Code).
public static readonly ClipboardFormat UniTextSourceUniText-native round-trip channel as a vendor-tree MIME type (application/vnd.lightside.unitext, RFC 6838). Carries a JSON UniTextClipboardFragment: the selection's visible text plus markup spans keyed by modifier signature — so a copy from one UniText field pastes into another with full semantic fidelity (each span re-emitted in the destination's own syntax, degraded to plain text when the destination lacks the modifier), regardless of which modifiers an HTML or Markdown serializer can represent. Interop consumers must parse the fragment JSON, not treat the payload as raw source markup. Per-platform mapping: Chromium browsers — web application/vnd.lightside.unitext (Async Clipboard custom format, mandatory web prefix). macOS / iOS — UTI com.lightside.unitext (reverse-DNS). Windows — RegisterClipboardFormatW("LightSide.UniText"). Android / Linux — MIME identifier as-is. External apps that do not recognise this format silently fall back to PlainText / Html in the same clipboard write — copy always emits the universal floor alongside the custom format.
public static readonly ClipboardFormat PngRaster PNG bytes (image/png). Apple UTI public.png; browser image/png blob. Windows writes the registered "PNG" format plus a synthesized CF_DIBV5, and reads either — so PrintScreen screenshots paste in and copied images land in Paint / Word. The cross-app baseline for image copy/paste.
public static readonly ClipboardFormat JpegRaster JPEG bytes (image/jpeg). Apple UTI public.jpeg.
public static readonly ClipboardFormat GifGIF bytes, animated or still (image/gif).
