Umbraco-cms: Enable copy/paste for grid items

Created on 10 Oct 2019  ·  14Comments  ·  Source: umbraco/Umbraco-CMS

Just like nested content, it could be very useful to have the ability to copy and paste grid items using the clipboardService.

communitup-for-grabs typfeature

Most helpful comment

Reopen issue, still very relevant

All 14 comments

Yes, we're on the road to enabling copy/paste for anything that makes sense. 👍

Is it something that you are working on in HQ, or is it open for PRs?

We still have some things to do at HQ before we can ask for contributions, give @nielslyngsoe a few more weeks to make this a nice experience please! :-)

Thanks :)

You can follow the progress on this issue: https://github.com/umbraco/Umbraco-CMS/issues/6816

I will keep this issue open, since it requests the copy feature specifically for the Grid.

@nielslyngsoe I was thinking about copying specific controls in the grid. Your PR adds the ability to copy the complete value - which also is very nice.

@skttl Oh, I see, my mistake. But good, we could use that as well.
Can I ask you to change the description to be more explicit in terms of copy/pasting individual items. Thanks

Reopen issue, still very relevant

This feature needs to emit events, so custom editors can react on being copied. As an example, Doc Type Grid Editor stores a guid key in each editor, and this needs to be regenerated when copied for this to work correctly.

Here's what I did to enable events in the grid editor:
https://github.com/umbraco/Umbraco-CMS/pull/2640

h5yr all. Love to see this finally happen.

Hi @skttl

It's up to the Custom Editor to implement the copy functionality and as well the paste functionality — thereby to ensure that it's done the right way.

Currently, We suggest removing unique data when making a copy, and ensuring keys are begin generated when pasting.

It's not enough to generate new keys for the copied data. Since the same data could be pasted multiple times.

I hope it makes sense, let us know if you see any potential problems with the current strategy or implementation.

Thanks

Oh sorry, meant pasted of course :)

I'm not sure how to implement this in grid, as it is the grid that takes care of copying/pasting as I see it. I guess the copy function should be in the blue title bar on each grid control.

Which was why I suggested an event you can subscribe to.

Hi @skttl,

We're writing to let you know that we've added the Up For Grabs label to your issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.

For more information about issues and states, have a look at this blog post

Thanks muchly, from your friendly PR team bot :-)

Would love this as well :-)

Was this page helpful?
0 / 5 - 0 ratings