5

Copying the code from the code snipptes is really annoying to select the right part of code (especially with long code parts with scrollbars) so it would be very helpful to have a shortcut like the normal Copy-and-Paste CTRL-C to copy it to the clipboard. If there is additionally a button for this it would be nice but is not decisive for the war.

The reason for this is often we needs often to copy the code for testing purpose to JSFiddle and consorts or to the locally IDE. Actually with this key-combination there is the hole site marked which didn't helped anybody. So why not implementing this?

Opening via a click on button besides the code snippet which opens the code in an selectable site (JsFiddle, PlayCode, ...) would be the icing on the cake. Alternatively opening an input-field in which a URL can be entered to which the code is transferred would be an option.

8
  • Alternatively, select the first character of the code from left to right, then scroll all the way down, then press Shift + Left Mouse Button right behind the last character to select all text in the code block. Commented Aug 20, 2020 at 0:36
  • Thanks, for this advice. But this only an emergency solution, It's not really a good solution only a behalf.
    – Sascha A.
    Commented Aug 20, 2020 at 0:44
  • 2
    It would probably be pretty easy to create a "Copy code" button to the side of each code block. It'd just take a bit of JS, which you could then run via a userscript. Commented Aug 20, 2020 at 0:57
  • 1
    Create a userscript that sends a post to jsfiddle or other sandbox with all the code.
    – charlietfl
    Commented Aug 20, 2020 at 0:57
  • Sounds good, hope it will come.
    – Sascha A.
    Commented Aug 20, 2020 at 1:03
  • 1
    I would kinda prefer that we discourage the sloth, or at least make it require a token amount more effort.
    – Cody Gray Mod
    Commented Aug 20, 2020 at 1:14
  • 1
    "hope it will come" ... A userscript is something you create yourself and run it in userscript extensions like Tampermonkey, ViolentMonkey etc
    – charlietfl
    Commented Aug 20, 2020 at 1:27
  • 1
    ... and I thought it's a script for user from the site ... ;).
    – Sascha A.
    Commented Aug 20, 2020 at 1:32

0

You must log in to answer this question.

Browse other questions tagged .