Is there a widget to have it copy text into the clipboard?
Asked by Mike Long:

I have a table of quick responses that the support team uses.   

If customer asks   
Blah - common response is   
Blaydehblah (paragraph of text)  

Currently this is a fairly long table. The Left column is usually quite brief but the right column is usually a paragraph or more of text. It would be nice if the left side was the only thing displayed, and the user could hover over the right column (perhaps just a keyword "Response" and then see what the response is, and if they like that, they click it and it gets automatically into their copybuffer.  

I've been unable to locate such a widget. Does such a widget exist?  


Answers:
author: Sven Schatter _K15t_
body: Hi [@_Mike Long](/t5/user/viewprofilepage/user-id/3189626),

The [code snippet macro](https://support.atlassian.com/confluence-cloud/docs/insert-elements-into-a-page/#Code-snippet) provides a copy button when hovering over it. It will still take a lot of space, but what you could do is wrap it in an [expand macro](https://support.atlassian.com/confluence-cloud/docs/insert-elements-into-a-page/#Expand) and have the content be hidden that way.

This will mean two clicks (first expand, then copy) for your users, but will save space on the page. Hope this helps!

Cheers,  
Sven

comments: author: Mike Long
body: Sven,

This sounds precisely like what I'd want.  
I did try the code snippet, which does offer the copy icon on the top right.

I cannot figure out how to get a code snippet inside of an expand macro?   
Is there some simple trick I'm missing?  

Thanks,  
Mike


author: Sven Schatter _K15t_
body: Hey Mike,

Not sure what I'm doing different from you but when I type "/code" inside an expand macro it gives me the option to insert a code snippet macro:

![Add Page - Sven Schatter - Confluence 2022-01-13 09-45-06.png](https://community.atlassian.com/t5/image/serverpage/image-id/177541iF8DC2713DDC167C5/image-size/large?v=v2&px=999 "Add Page - Sven Schatter - Confluence 2022-01-13 09-45-06.png")

Does this not work for you?

Cheers,  
Sven


author: Mike Long
body: For me, I can type /code inside, but then it creates the code snippet outside the expand macro, and I have no way to move it inside.  

I made a recording, but couldn't figure out how to add it here. The screenshot below, I'll just "narrate".  
So I created the table entry "Item 1", then in next column added two lines of text  
Opened a line between then and put in /code, and when I hit tab or enter, it will just create the code region after the expand macro, not within it.  
Then I put some text inside the code region, then tried to drag/drop it into the expand macro. Depending on if I was midpoint, above or below, it would "drop it" to below or above the expand macro.   
But since you have had success, let me know what I've been doing wrong?

![Screen Shot 2022-01-14 at 8.33.54 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/177800i889C7AF4E23D4411/image-size/large?v=v2&px=999 "Screen Shot 2022-01-14 at 8.33.54 AM.png")


author: Sven Schatter _K15t_
body: Wow, Mike, you are right! Apparently Confluence doesn't let you do this in tables. That's unfortunate.

I guess the only other way I can think of then is to use page layouts. With this you'd however be limited to 3 columns max:

![Add Page - Sven Schatter - Confluence 2022-01-14 14-47-35.png](https://community.atlassian.com/t5/image/serverpage/image-id/177802i7C249C049167C5EF/image-size/large?v=v2&px=999 "Add Page - Sven Schatter - Confluence 2022-01-14 14-47-35.png")

If this doesn't work for you you might have to look on the Marketplace and see if there's any third party macro that can do what you need.

Cheers,  
Sven


Tags: cloud

confluence-cloud