-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add Copy to Clipboard feature to Markdown and other fields #6726
Comments
Thanks for sharing this request, @Hyperrick! |
Do you have a specific use case for this, or would you just find it nice in general? |
Hello @jrieke, I'm building a ChatGPT API wrapper and need this functionality ;) |
Any use case is exactly the same as it is for the code fields! Why would I exclusively want to copy code, but not any other text content? Imo a no-brainer to offer this optionally for all fields. |
Hi There, I don't think this necessarily solves the issue because having this integrated into Streamlit would be ideal, but this absolutely works for my use case. streamlit_custom_copy_to_clipboard_buttons.mp4 |
Absolutely agree with @TomTom101 ! If you're after one specifically though... Of greater utility would be a single button (not embedded in any other control) that can paste a text or binary object to the clipboard and functioning much like the download button. For example, |
I would like to add a huge +1 to this Issue and echo the sentiments above and in other related threads. I have perused the frontend-folder (despite knowing zero JS/TS/React). I can see that the copy-button in the code-block is implemented using ClipboardJS. However, I believe this only supports plain text (as opposed to rich/formatted text)—is this the reason for the functionality to only appear in @carolinedlu you asked in another thread what the use cases for copy to clipboard might be? As others have already mentioned, in the days of LLMs, I imagine a chat/search-interface is a pretty prominent use-case for If there are technical reasons that prevent easy implementation on arbitrary text-elements, I can accept that the copy-button only appear in a few. It's essential, however, that rich text can be copied with highlights, links and all. Please ping me if I can help testing. I'd also be willing to take a stab at a PR, if a dev were to point me in the right direction? Here are some references I think might help the quest:
For the record: I don't care if it doesn't work in Firefox :) |
Problem
It would be really helpful if the existing copy to clipboard feature from code fields could be used in other field types like markdown or text areas.
Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.
If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.
The text was updated successfully, but these errors were encountered: