Skip to content

[6.x] Ability to cut, copy and paste between replicators#14160

Open
jacksleight wants to merge 3 commits intostatamic:6.xfrom
jacksleight:feature/replicator-copy-paste
Open

[6.x] Ability to cut, copy and paste between replicators#14160
jacksleight wants to merge 3 commits intostatamic:6.xfrom
jacksleight:feature/replicator-copy-paste

Conversation

@jacksleight
Copy link
Contributor

@jacksleight jacksleight commented Mar 5, 2026

Update of #10359 for v6.

This PR adds the ability to cut/copy/paste sets between different replicators/pages/tabs:

CleanShot.2026-03-05.at.14.22.10.mp4

Notes

  • Replicators use a list of set config hashes to decide whether the set being copied is compatible with the target replicator.
  • Due to its limitations this does not use the Clipboard API. Instead, within the current page the data is stored in Vue, and local storage is used to persist it between pages/tabs (session storage isn’t suitable as it doesn’t work between tabs).
  • Since local storage has no expiry but you don’t want copied values hanging around forever items are added to the clipboard store with a 10 minute TTL.
  • There's a new useClipboard composable that takes care of all the data storage and tracking, this means it should be fairly straightforward to add the same feature to other fieldtypes in the future (if wanted).
  • This uses the field actions menu for all the cut/copy/paste options as that's what the original PR did, but the new UI in v6 can probably accomodate these in a different/better way, I'll leave that for you to decide.

Other Changes

This PR includes some of the same "Other Changes" as #13042, since they're related and using the same hashes.

Closes statamic/ideas#748
Closes #8572

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move sets between sets

1 participant