IClipboardAdapter
Per-format clipboard pipeline stage. Copy adapters translate the canonical attributed selection into an external format; paste adapters translate that format into attributed destination content. The editor's UniTextEditable.Copy walks every registered adapter to build a multi-format clipboard write; on UniTextEditable.Paste the highest-Priority adapter whose Format is present on the clipboard wins.
Remarks
Implementations(4)
Types that implement IClipboardAdapter.
public ClipboardFormat Format{ get }Clipboard format this adapter writes on copy and accepts on paste. The editor uses this to populate the multi-format write and to pick the appropriate adapter on paste.
Selection priority on paste. Higher wins. Built-in priorities: UniTextSourceClipboardAdapter=100 (lossless), HTML=50, Markdown=40, PlainTextClipboardAdapter=0 (floor). Custom adapters that should preempt the built-ins use values above 100.
public abstract string SerializeCopy(ClipboardCopyContext context)Serialize the current selection into this adapter's clipboard format. Returns the text payload to attach under Format's identifier, or null / empty to skip this format in the multi-format write (e.g. an HTML adapter with no applicable modifiers in the selection).
public abstract ClipboardPasteContent DeserializePaste(string payload, ClipboardPasteContext context)Deserialize external clipboard payload into visible text and resolved destination spans. Returns null to abort and let the pipeline fall through to the next-best format on the clipboard.
