# How can I add a Copy Button?

**URL:** <https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [December 19, 2020, 12:04pm UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333 "2020-12-19T12:04:19Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![mikailsarkar02g0m](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mikailsarkar02g0m](https://community.thunkable.com/u/mikailsarkar02g0m)\
**Post date:** [December 24, 2020, 7:34am UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/21 "2020-12-24T07:34:56Z")

</div>

I want “copy to clipboard” after I want to paste it Messaging or Facebook Messenger.

---

<div class="post-metadata">

**Author:** ![mikailsarkar02g0m](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mikailsarkar02g0m](https://community.thunkable.com/u/mikailsarkar02g0m)\
**Post date:** [December 24, 2020, 7:38am UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/22 "2020-12-24T07:38:23Z")

</div>

I don’t have this option on [x.thunkable.com](http://x.thunkable.com). ![Screenshot_1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/9/292a77f900c493fe593249a1a1d1055018a24d8d.png)

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [December 24, 2020, 7:46am UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/23 "2020-12-24T07:46:25Z")

</div>

well there is as @jared said

---

<div class="post-metadata">

**Author:** ![eko.devs.apploroceo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eko.devs.apploroceo/32/93147_2.png) [@eko.devs.apploroceo](https://community.thunkable.com/u/eko.devs.apploroceo)\
**Post date:** [December 24, 2020, 8:20am UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/24 "2020-12-24T08:20:11Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/8/083240e55d9dd956decb4484eb3ae84cc8d8a079.png)

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [December 24, 2020, 8:23am UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/25 "2020-12-24T08:23:00Z")

</div>

This block will not allow users to paste text anywhere outside the app. @jared’s CopyToClipboard website would work if there was a block after the . Jared, would it be possible for you to update that website?

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [December 24, 2020, 8:31am UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/27 "2020-12-24T08:31:54Z")

</div>

if you actually want to copy to clipboard then use @jared’s method

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [December 24, 2020, 11:01am UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/28 "2020-12-24T11:01:47Z")

</div>

Hey @codeswept, I have updated the code. It should work for you.

Thanks for pointing out the missing tag @jaythemanchs, I wrote that script on my phone, on GitHub, on the go. Much appreciated proofreading!

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [December 24, 2020, 11:02am UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/29 "2020-12-24T11:02:59Z")

</div>

Great! Thanks @nradjt74jatz. This is indeed a wonderful new addition to what you can do on Thunkable.

---

<div class="post-metadata">

**Author:** ![eko.devs.apploroceo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eko.devs.apploroceo/32/93147_2.png) [@eko.devs.apploroceo](https://community.thunkable.com/u/eko.devs.apploroceo)\
**Post date:** [December 24, 2020, 12:49pm UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/30 "2020-12-24T12:49:46Z")

</div>

@jared  
great wrk

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [December 25, 2020, 7:23am UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/31 "2020-12-25T07:23:18Z")

</div>

Hey @jared  
I tried this today, and it wasn’t copying. I even viewed page source, copied the code, and created a Github repository (hope you’re fine with that: if you want me to take it down, I can) but it still didn’t work.  
What should I do?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 25, 2020, 7:52am UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/32 "2020-12-25T07:52:45Z")

</div>

The code will work on a computer but not on a mobile phone.

Try it using the web Live Test.

---

<div class="post-metadata">

**Author:** ![eko.devs.apploroceo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eko.devs.apploroceo/32/93147_2.png) [@eko.devs.apploroceo](https://community.thunkable.com/u/eko.devs.apploroceo)\
**Post date:** [December 25, 2020, 1:44pm UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/33 "2020-12-25T13:44:06Z")

</div>

yep so use my code  
it may wrk  
partially

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [December 25, 2020, 5:03pm UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/34 "2020-12-25T17:03:18Z")

</div>

where is your html code @eko.devs.apploroceo???

---

<div class="post-metadata">

**Author:** ![eko.devs.apploroceo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eko.devs.apploroceo/32/93147_2.png) [@eko.devs.apploroceo](https://community.thunkable.com/u/eko.devs.apploroceo)\
**Post date:** [December 25, 2020, 5:22pm UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/35 "2020-12-25T17:22:40Z")

</div>

i showed the block code  
 ![Screen Shot 2020-09-30 at 11.42.44 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/7/6791893c222446ec08be91f45d9ccdf75a195632.png)

---

<div class="post-metadata">

**Author:** ![aaminahmansuri59h](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/aaminahmansuri59h/32/89753_2.png) [@aaminahmansuri59h](https://community.thunkable.com/u/aaminahmansuri59h)\
**Post date:** [December 26, 2020, 3:23am UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/36 "2020-12-26T03:23:28Z")

</div>

Hey,  
@mikailsarkar02g0m if you want to paste in Facebook or any other. Then you can use share component also.

---

<div class="post-metadata">

**Author:** ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)\
**Post date:** [December 26, 2020, 5:31am UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/37 "2020-12-26T05:31:16Z")

</div>

This doesn’t work @eko.devs.apploroceo. You can’t paste this outside your app, and you can’t use CTRL-V to paste it even inside the app. It doesn’t work.

---

<div class="post-metadata">

**Author:** ![mikailsarkar02g0m](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mikailsarkar02g0m](https://community.thunkable.com/u/mikailsarkar02g0m)\
**Post date:** [December 26, 2020, 6:42am UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/38 "2020-12-26T06:42:44Z")

</div>

No. I don’t want to share facebook or other social media.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [December 26, 2020, 1:28pm UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/39 "2020-12-26T13:28:37Z")

</div>

There is some issue using the above javascript solution, i have posted about it on github here.

> <https://github.com/thunkable/thunkable-issues/issues/793>
>
> Thanks so much for filing an issue or feature request! Please fill out the follo…wing (wherever relevant):
> 
> The more info, the faster we will be able to address it!
> 
> \### Platform
> IOS companion 
> 
> \### Issue - Object blocks arent working for objects received as messages through the webveiwer on companion or downloaded apps. 
> 
> I am able to receive and work with objects using the live preview in chrome on both my phone and computer. 
> 
> Here are two strings with projects showing this
> 
> https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/10?u=nradjt74jatz
> https://community.thunkable.com/t/password-tracker/1041697/4?u=nradjt74jatz
> 
> The issue is that I am doing stuff with data in JS and then passing it back to the webviewer. The webviewer will receive plain text fine but when sending an object, the object blocks don’t handle it correctly and print 
> 
> “\[object object\]”
> 
> the live preview in chrome works fine though. 
> 
> !\[3C246EE1-2704-40AA-8E75-898B6FAAF169\](https://user-images.githubusercontent.com/70493366/103141385-9bb69a00-46c1-11eb-8893-67c2ede41785.png)
> 
> \### Steps to Reproduce
> 1. put a webviewer in an app. 
> 2. direct webviewer to jaredgibb.github.io/PasswordCheckR.html
> 2. use blocks to post a message to webviewer "poopyPants"
> 3.use blocks to receive a message from the webviewer
> 
> \### Project Link
> https://x.thunkable.com/projectPage/5fe49ea50264310011d03008
> 
> \### Expected Behavior
> I expect to see the json (and be able to Use it with the object blocks) on in the companion app and downloaded apps as it is displayed (and accessed) in the live preview on chrome. 
> 
> \### Actual Behavior
> "\[object, object\]"
> 
> !\[050324D9-BF89-4851-B1E3-AEF512A543F9\](https://user-images.githubusercontent.com/70493366/103154558-10431480-4766-11eb-8c14-b75fce61a789.png)
> 
> !\[83A9C218-468A-483F-854A-B9D4C20F7F33\](https://user-images.githubusercontent.com/70493366/103154559-10dbab00-4766-11eb-924d-eebcc4eb049b.png)

---

<div class="post-metadata">

**Author:** ![legendinplayzl6wx](https://avatars.discourse-cdn.com/v4/letter/l/53a042/32.png) [@legendinplayzl6wx](https://community.thunkable.com/u/legendinplayzl6wx)\
**Post date:** [January 19, 2021, 12:18am UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/40 "2021-01-19T00:18:27Z")

</div>

this worked

---

<div class="post-metadata">

**Author:** ![damascus7905](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@damascus7905](https://community.thunkable.com/u/damascus7905)\
**Post date:** [April 13, 2023, 3:59pm UTC](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333/42 "2023-04-13T15:59:11Z")

</div>

Hey… i didn’t understand your message  
Can you send a block of code regarding what i’m supposed to do?  
I’m making a speedrun retime tool and it’s necessary to have the final time copy-able.  
Thanks!

[Previous page](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333.md?page=1)

[Next page](https://community.thunkable.com/t/how-can-i-add-a-copy-button/1040333.md?page=3)
