6

In Firefox 56, how can I quickly copy a URL in the markdown format?

[title](url)

In theory, VimFx should work, but it doesn't, so I either want to find what's wrong or another method to do this.

2
  • @DavidPostill: thanks for your edit. I wonder why using "how can I" is better than "how to"? I thought the latter is shorter, hence more preferable, especially in question's title?
    – Ooker
    Commented Jan 17, 2018 at 11:20
  • Not a lot of difference, but "how can I" is a little better grammar :)
    – DavidPostill
    Commented Jan 17, 2018 at 11:21

5 Answers 5

5

How can I copy a URL in markdown format [title](url)?

You can use the Copy as Markdown extension.

Copy as Markdown is a browser extension helps you copy the following things as Markdown to your system clipboard:

  • ☑️ Current Tab as Link
  • ☑️ A Link in the Page
  • ☑️ An Image in the Page
  • ☑️ An Image that is wrapped with a Link
  • ☑️ All Tabs as a List of Links
  • ☑️ Highlighted Tabs as a List of Links

Source chitsaou/copy-as-markdown: Copying Link, Image and Tab(s) as Markdown Much Easier.

Screenshot:

enter image description here

Review:

  • A very useful extension, particularly for adding links to questions and answers on SE. I wish I'd found it a couple of years ago.
  • The Firefox extension works on FF57+.
  • There is a Chrome extension as well (I haven't tried it).
1
  • Nice find. Just downloaded it from the Chrome store and tested it in a Chromium-based browser and can confirm that the Chrome extension works, also.
    – fixer1234
    Commented Jun 1, 2019 at 20:47
2

You can save the following script as bookmark

javascript:(function(){%20window.prompt("Press%20Ctrl+C%20then%20Enter%20to%20close%20the%20dialog",'['%20+%20document.title%20+%20']('%20+%20document.location.href%20+%20')');%20})();

then assign a keyword to it (like c). Now every time you want to copy just select the address bar, press c and Enter. This doesn't need any add-on

You can also open the console with F12 then run this

window.prompt("Press Ctrl+C then Enter to close the dialog", '[' + document.title + '](' + document.location.href + ')');
0

Easy Copy

Features:

  • Rich templates: HTML, Markdown, BBcode, Wikipedia markups, all links on page, etc
  • Rich variables: link title, page title, custom selection, date and time, image alt text, etc
  • Text trimming
  • Hotkeys support

You can read more at its wiki. It isn't compatible with Firefox Quantum unfortunately.

0
0

Copy URL To Clipboard is a good replacement for Firefox Quantum.

You can assign shortcuts in the addon page

There are other similar addons (Keyboard Control for Firefox, Text Linky Tool, Format Link), but their HTML output is just the code, not true hyperlink.

0

The awesome Tridactyl extension has the keybinding ym for "yank markdown", which does exactly this. It might be overkill for this single piece of functionality, but since the original question mentions VimFX, people here might also be interested in the other features it provides.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .