Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dergachev/5631965 to your computer and use it in GitHub Desktop.
Save dergachev/5631965 to your computer and use it in GitHub Desktop.
Onetab export format to gists;
// works on selected text
var selection = window.getSelection().toString();
if (selection) {
selection = selection.match(/[^\r\n]+/g)
.map(function(a) { return "* " + a; }).
join("\n");
prompt("Here's your markdown:", selection);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment