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.
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.
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.
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
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.
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.
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.