Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add a copy to clipboard button in a GitHub readme

Tags:

github

I am writing a README.md in GitHub Flavored Markdown, which I'll push on a GitHub repository. Is there any way to add a copy-to-clipboard button for each code snippet the README.md contains, when viewing on https://github.com/username/reponame/README.me?

like image 892
Franck Dernoncourt Avatar asked Aug 30 '15 22:08

Franck Dernoncourt


People also ask

How do I upload a screenshot to github?

drag and drop your screenshot on this issue. copy the markdown code that github has just created for you to display your image. paste it on your readme (or wherever you want)


2 Answers

Since 5 years later I was Googling the same in question... here is another Chrome extension to copy the posted source code from readme files: codecopy

It works on:

  • GitHub
  • MDN
  • Gist
  • StackOverflow
  • StackExchange
  • npm
  • Medium

And more.

Obviously ideally it'd be great not to have to install any extension.

like image 107
Franck Dernoncourt Avatar answered Oct 03 '22 16:10

Franck Dernoncourt


I created a Chrome extension to copy the posted source code from readme files.
It works on:

  • github
  • stackoverflow
  • npmjs

Check the repository: https://github.com/panzerdp/clipboardy

like image 22
Dmitri Pavlutin Avatar answered Oct 03 '22 15:10

Dmitri Pavlutin