Hi all,
Just letting you know I was just looking for an option to copy code fences to the clipboard, as this is incredibly useful especially for huge chunks of YAML for pre-made UI widgets.
Turns out the option already existed in Discourse, so naturally I activated it. You’ll get a little button in all code fences and you can click on it to copy the entire thing to the clipboard. Then you can simply paste it wherever you need it. No more selecting a bunch of code around with the mouse.
Note that using GitHub Gists (if you don’t want to create a full-fledged repo) and copying the link is also a very clever alternative for these pieces of code, since it’s overall better presented and the versioning is clearer too.
Cheers,
Yannick