Allow Studio plugins to copy things to clipboard

As a Roblox developer, it is currently impossible to make plugins that copy strings to the user’s clipboard. To make copy-able text, we have to show a TextBox, focus it, select the text, and then ask the user to copy it themselves.

If Roblox is able to address this issue, it would improve my development experience because I could make plugins that copy text to the clipboard for pasting elsewhere, such as asset IDs that can be pasted in the Properties widget, or other types of output strings like code snippets that could be pasted into scripts.

Proposed solution: Make StudioService:CopyToClipboard() PluginSecurity.

55 Likes

In the meantime, a workaround is making a readonly textbox. The text can be selected and manually copied by the user

5 Likes

Support - I currently have to use read-only textboxes as a lackluster compromise in my own plugins:

image

Being able to click to copy would make the process frictionless.

9 Likes

As long as it only works while the Studio window is focused, and/or notifies of the fact something got copied to my clipboard, I’d be okay with that. I don’t want plugins silently putting garbage / inappropriate text / security-invasive scripts in my clipboard that I might accidentally end up running somewhere in a chat / console while working on Roblox stuff.

25 Likes

This feature should be enabled and work similarly to android or apple applications where the user must accept the permission first on a plugin-by-plugin basis. Besides that, this feature would make a great addition to studio plugins.

16 Likes

Bumping.

If security is such a big concern, there are two things I suggest

  • PluginPermission - require the plugin permission to save contents to the clipboard
  • A prompt notifying the user that Plugin X wrote to the clipboard. This has proven to be useful on iOS

Also, this API would need to be more fleshed out besides just being text to support other MIME types

14 Likes

This would seriously be a good idea.
Maybe they make it so it can only be called by a function that is called by a button’s click connect, alongside having a plugin by plugin permissions enabled.

It would make it so much easier to make text copyable for users

1 Like

I support this. It would also look professional if we don’t need to make a TextBox with a text. But users should get a option to enable/disable this for a specific plugin.

That’d be amazing if it was added. I support this

1 Like

Bumping this once again, there are numerous requests for this and in a Studio context, this would be an amazing QoL feature. Since this proposal is only for copying and not for reading, I don’t see any issues.

As others mentioned, a notification for a plugin copying to clipboard can be added, if security is holding this QoL back. Additionally, you can check if the plugin window is focused / activated.

3 Likes

As of 2024, Roblox has made Plugins a Paid Product, yet we still have limited features for Plugin Usage, this needs to exist more than ever.

A modern Proposed Solution would be:

plugin:SetClipboard(...)

As well as a ‘Permissions Pop-Up’ to allow the user to make the informed decision of allowing said plugin to copy to Clipboard.

1 Like
while true do
    plugin:SetClipboard(string.rep("z",100000))
end

There should be a debounce that prevents this. A way to tell if you can properly set the clipboard is if they added another method, plugin:CanSetClipboard(): boolean!

I already explained this, if they would like to, they could most likely make the popup showup every-time clipboard is called (and show you what it wants to copy), not just once per plugin, which I believe would be better, a boolean for such thing wouldn’t mean alot of sense, as code can be tons of lines, therefore invalidating code if alot of code was meant to be copied.