PasteDetail
Since v0.1.1
Event detail emitted after a paste operation *
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
rows | string[][] | Parsed rows from clipboard (2D array of cell values) |
text | string | Raw text that was pasted |
target | PasteTarget | unknown | The target cell where paste starts (top-left of paste area). Null if no cell is selected. |
fields | string[] | Column fields for each column in the paste range, starting from target.col. Useful for mapping parsed cell values to data fields. Length matches the width of the pasted data (or available columns, whichever is smaller). When fillSelection is active, this spans the full selection width so the source can be tiled. |
fillSelection? | boolean | When true, the paste handler tiles the clipboard source across the full selection bounds (see ClipboardConfig.fillSelection). Set by the plugin from config; only ever true when target.bounds is set. v3.0.0+ |
rawRows? | unknown[][] | Raw (structured) cell values for a same-grid paste, aligned 1:1 with rows (same dimensions, data rows only). Present only when the paste text exactly matches what this grid last copied — so an object-valued cell (e.g. {id,name}, arrays) round-trips losslessly instead of degrading to the copied display text. undefined for external/cross-grid pastes, where only the text is available. The default handler prefers rawRows over rows for values (cloning each so targets don’t share references). v3.0.0+ |
sourceFields? | string[] | Source column fields the pasted data was copied FROM, in the copied column order (aligned with the columns of rows / rawRows). Lets a column’s BaseColumnConfig.onPaste know the origin column so it can reject cross-column / cross-type pastes. Present for a same-app paste (same grid via the in-memory buffer, or cross-grid / cross-window via the structured text/html payload); undefined for external pastes (e.g. from Excel), where only the text is available. v3.0.0+ |
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt