fn
readSlice
The fragment a clipboard (or drop) payload holds, by fidelity: writekit's own
JSON, then HTML, then text. HTML that adds no structure of its own — a code
editor's coloured spans, a terminal — defers to the text beside it, which
also gets the markdown-style line rules. null when there is nothing to
paste as content (an image file, say).
Signature
ts
export function readSlice(data: DataTransfer, registry: Registry, options: ReadSliceOptions ={ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
data | DataTransfer | — |
registry | Registry | — |
options? | ReadSliceOptions | — |
Returns
Slice | null