Copy and Paste to and from clipboard (DEF-2070)

#1

I need this mainly so users can copy and paste long strings of text to use as secret keys for authentication such as “PTsky0EITXT8agihiKu3FiPZ9pjAmKDjqGVvF4iQ”

1 Like

#2

Created a ticket: DEF-2070

1 Like

#3

Sorry to drag DEF-2070 out from the depths of the backlog, but just to see if it’s on the horizon? This would be useful to copy and share unique item IDs for a game I’m building.

0 Likes

#4

Have you tried https://github.com/britzl/defold-clipboard ?

2 Likes

#5

Amazing. I was going to have to look for something like that in a few hours.

1 Like

#6

I hadn’t, thanks for the pointer! Works a charm. :partying_face:

@britzl could this work with HTML5?

1 Like

#7

Maybe. It’s another security thing that needs to be circumvented though. It might be doable.

1 Like

#8

That would be awesome!

0 Likes

#9

The code for copying to clipboard is basically this:

But I think the code has to be triggered from a javascript event which complicates things.

1 Like

#10

Defos has a defos.on_click() that lets you run a callback from the onclick JS event.

3 Likes