Open radames opened 3 years ago
Would this copy the value (the output) of the cell, or the source code of the cell?
That's a good point. I suspect that in most of my cases, the output value is what is interesting. Rather than download a csv/json/text, you can quickly grab it to the clipboard. Maybe for the source code, we should stick to the keyboard shortcuts? Unless you have more use-cases where users want to copy code
@radames If this this intended as an alternative to the "Download text/CSV/JSON" options, perhaps it should only be offered as an option when the respective download option is available?
Hi @mootari, yes, that's exactly how I was thinking.
@radames Trying to summarize:
Correct?
@mootari, yes, that is a great summary.! And you've recalled me that any object can be download as either CSV or JSON, which will add more options for the copy button. Have I just learned that? 😲
Thinking of another software, Figma presents you with submenus, which doesn't seem to be a problem. What do you think?
Is your feature request related to a problem? Please describe.
It would be great to have a shortcut button to copy content to the clipboard
Describe the solution you'd like
Here is a simple idea: add the copy to the clipboard shortcut to the menu options in each cell with copiable content.
Describe alternatives you've considered
Currently, you have to import or implement a helper on the target notebook, here as list:
https://observablehq.com/@radames/clipboard-button https://observablehq.com/@mbostock/copier https://observablehq.com/@tomktjemsland/copy-to-clipboard https://observablehq.com/@ryanseddon/copy
Additional context
Related forum discussion https://talk.observablehq.com/t/copying-json-data-to-clipboard/2353