regexr icon indicating copy to clipboard operation
regexr copied to clipboard

add a copy button to copy expression

Open wneel opened this issue 3 years ago • 3 comments
trafficstars

Hi,

Before I would like to thank you for this super useful website, i use it frequently and one feature that I'm missing is : a copy button !

because each time we want to copy an expression we have to then write / before and /g or /gi or whatever after

So, this PR add a copy expression button :

https://user-images.githubusercontent.com/66263633/181645943-e0309593-5616-4266-86cd-0fb8d1f25ec8.mp4

336858233118761/add_button_to_copy_expression.mp4)

wneel avatar Jul 28 '22 22:07 wneel

i would love to see a feature like this !

napiraz avatar Jul 28 '22 22:07 napiraz

Thanks for the PR! Apologies for the delay in responding.

A couple notes:

  1. We have fairly limited space in those headers when running at minimum width, so I'd reduce it to just an icon, or maybe an icon + "Copy".
  2. If this is going to be added, I think it needs to be in a language agnostic way. This is actually part of what prevented me adding this before. Here's a sketch of one way I could see that working — it's a little bit cludgy, but workable. Totally open to other ideas too.

image

gskinner avatar Dec 21 '22 18:12 gskinner

Thank you for the reply !

I totally understand the the need to suggest more specific options for every uses cases and languages, I am currently on a project but I edit the PR asap and I'll make those change !

And of course I understand the size constraints and I will take them into account when submitting an update.

wneel avatar Dec 23 '22 00:12 wneel