Skip to content

defaultPasteHandler

Since v0.4.2

Default paste handler that applies pasted data to grid.rows.

This is the built-in handler used when no custom pasteHandler is configured. It clones the rows array for immutability and applies values starting at the target cell.

Behavior:

  • Single cell selection: paste expands freely, adds new rows if needed
  • Range/row selection: paste is clipped to fit within selection bounds
  • Non-editable columns: values are skipped (column alignment preserved)
function defaultPasteHandler(detail: PasteDetail, grid: GridElement): void
NameTypeDescription
detailPasteDetailThe parsed paste data from clipboard
gridGridElementThe grid element to update
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt