selecto icon indicating copy to clipboard operation
selecto copied to clipboard

Copy a selected area?

Open nlarusstone opened this issue 2 years ago • 1 comments

Environments

  • Framework name: raw JS
  • Component name: Selecto
  • Component version: "selecto": "^1.13.2"

Description

Is there a way to copy the selected area? For context, I have a grid of divs similar to the demo (https://daybrush.com/selecto/storybook/?path=/story/selecto--welcome), but each of those divs contains some information (let's say text for right now). I'd like to be able to drag to select some of those divs and then copy and paste them to other divs.

What's the best way to do this?

nlarusstone avatar Feb 28 '22 22:02 nlarusstone

@nlarusstone

selectStart, select, and selectEnd events have a rect property. rect contains the position and size of the select area.

daybrush avatar Mar 09 '22 14:03 daybrush