-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arbitrary click-to-copy links #1222
Comments
Thank you for submitting an issue! Hm, this is certainly an interesting idea. From my perspective, the biggest difference would be the styling - I'd imagine that you'd want this to look more like an inline link, rather than the actual copy code button? With that in mind, I think we'd want to add a new CSS class that just makes a link "copyable", and allow users to combine it with other CSS classes to style the button itself. What do you think? (happy to further explore this and push it upstream) |
Is your feature request related to a problem? Please describe.
I've just implemented the new copy code button on a private project documentation site and am loving the copy functionality. I wonder if it would be possible to extend the logic to copying other things to the clipboard? ie copying an email address to a clipboard, or even if someone didn't need to see the "code" copied. For example, my use case is sharing a Google App Scripts library ID—it's totally fine to have that ID in a code block with a copy code button, but no one really needs to see that ID before copying it.
Describe the solution you'd like
I am not a coder at all, so apologies for any "language barriers" here. Instead of a link button that would be formatted like:
something as easily customizable where clicking copies a stable string/code. I know this code wouldn't actually work since it's link formatting, but something as easy as:
The text was updated successfully, but these errors were encountered: