Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Copy & Paste across pages in AEM6

Avatar

Level 2

Hi All,

I'm a begginers of AEM6 ... and I need to copy a component inside a page and paste it in another page (parsys).

I verified that copy & paste works inside the same page, but it is not possible copy a component and try to paste it in other page.

Why there is this kind of limitation?

If I would implement the copy&paste component across pages, is it possible? And how could I do it?

Any suggestion will be appreciated.

Thanks in advance.

Emilio

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi Emilio,

Are you using the classic or touch ui? If the classic ui, turn on the content finder by adding cf# to your URL, so for example http://localhost:4502/cf#/content/geometrixx.html. From there, you can copy (ctrl - c) the component or multiple components. It will be in the clipboard. Then navigate to the URL you want to paste it to and use ctrl v to paste it. One trick is that you need to be in the same tab on your browser to do this. Hope that helps.

Regards,

Alva

View solution in original post

4 Replies

Avatar

Correct answer by
Employee

Hi Emilio,

Are you using the classic or touch ui? If the classic ui, turn on the content finder by adding cf# to your URL, so for example http://localhost:4502/cf#/content/geometrixx.html. From there, you can copy (ctrl - c) the component or multiple components. It will be in the clipboard. Then navigate to the URL you want to paste it to and use ctrl v to paste it. One trick is that you need to be in the same tab on your browser to do this. Hope that helps.

Regards,

Alva

Avatar

Level 10

The reason why copy and paste among different pages is not an option is because the best practice is to drag the component from the CQ sidekick, or siderail in Touch UI. All components are available on sidekick. 

Avatar

Level 10

Are you using crxde light?

Technically it will work & fails only if there is node constraints.  What error are you getting?

Avatar

Level 2

Thank for your answers.

I want use copy and paste because the component I'm working is a composition of other components (sub-components). So for an author would be easier and useful copy an existing component instead create a new one from scratch (and edit each sub-components), specially if the second is very similar to first one.

I'm using copy&paste in touch ui, so I'm using toolbar button COPY on starting component and then the button INSERT on the parsys of the destination page.

Effectively if I stay in the same tab of browser - as @Alva suggests - it seems to work correctly! This requires, however, that between the copy and paste operations, needs to change URL page. It's my opinion that the easier and natural way to work is to have two open tabs: one for starting page (copy) and one for the paste one (insert).

In this case Alva's suggestion lead me to refresh (F5) destination page, before use the INSERT button (in order to simulate the reload of page that is done working in the same tab) .

In this way it seems to work. I do not understand the reason, because looking in /libs/cq/gui/components/authoring/clientlibs/editor/js/editableActions/clipboard.js it use localStorage that it should share data between open tabs in a browser.

Do you have idea why?

Thanks.