How to copy a URL with its title in markdown format?

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.


Solution 1:

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).

Solution 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 + ')');