Copy/paste must work within app and with external sources.
Internal copy:
Store selected cells in internal clipboard
Track relative positions
On paste, apply to new location
System clipboard:
// Copy to system clipboard as TSV
const text = selectionToTSV(selectedCells);
navigator.clipboard.writeText(text);
// Paste from system clipboard
const text = await navigator.clipboard.readText();
const cells = parseTSV(text);
Formula adjustment: When copying "=A1+1" from B1 to C1, adjust to "=B1+1".