Automatically insert markdown formatted link if text is selected when pasting

A really small feature but it’s really neat in Typora. If you have a URL in clipboard and then with some text selected in a note, you press Ctrl + K, there’s no additional step to paste the link, say, by pressing Ctrl + V. The link from clipboard is inserted automatically.

P. S. Searched the forum for this suggestion, sorry if already been raised.

32 Likes

I like this idea too; other markdown editors behave similarly. I edited the title to be more descriptive—hope that’s okay!

2 Likes

I would also like to see this - one of my favorite and most missed features from Notion.

Given you have a markdown file containing: "You have a string of text."
And the OS Clipboard contains "https://obsidian.md/"
And the editor has the word string highlighted.
When you paste
The document updates to: "You have a [string](https://obsidian.md/) of text."

This feature is part of the Visual Studio complete ‘Markdown All in One’ extension.

3 Likes

when user press the Ctrl/Cmd + K, lookup clipbroad, if a URL inside, then place to

like Typora.

7 Likes

I wish that when I paste url it would be automatically wrapped in []() brackets, something like this:

[https://forum.obsidian.md/](https://forum.obsidian.md/)
or like this
[Change this title](https://forum.obsidian.md/)

Now I have to wrap them manually for every url I paste.

Check out the “Paste URL into selection” plugin from Denis Olehov. It’s available in the Third Party Plugins within the app.
Here’s the GitHub page if interested.

I’ve been using it for a while now with no issues. The only catch is to remind yourself to use CTRL/CMD + Shift + v instead of CTRL/CMD + v when you paste.

Hope that helps!

9 Likes

I’ve installed it and it’s a bit helpful but I wished it worked like in MarkText app - no selection required and pasting multiple links at once was possible. Anyway thanks for help.

The plugin mentioned by @Erisred already can do most of this. I’d suggest making a request in that repo for the case when there is no text selected.

Alternatively, you can use any of the markdown clippers mentioned here: How do I get content from websites into my notes?
Some of them offer the functionality to copy as markdown links.

3 Likes

You do not have to wrap manually if you simply change the order to:

  • select text
  • press and hold Ctrl
  • press K
  • press V
  • release Ctrl

For cases without selecting text it is best to use text expander like AutoHotkey(for Windows), Keyboard Maestro or Espanso to get consistent behavior in every desired application.

1 Like

Simply use this plugin and set the shortcut to Cmd+K. Works flawlessly.

I just want to add that I started using Obsidian recently and I was quite surprised that this feature was not there. It’s one of my favorite features in other apps and it seems like everyone is adding it (Notion, GitHub, Slack, Linear). It would be very nice to have it out of the box in Obsidian too.

Just want to +1 this. This is my post missed feature in Obsidian. It is causing me friction every single day

Commenting to also vote for the idea - would be great to have a native Obsidian support for this functionality.

Thanks for sharing. Exactly what I was looking for :partying_face:
Would also love to see native obsidian support for this feature.

I think that this feature should be included into Obsidian core and I should not have to install an external plugin (or at least not a community one).

Is there any plan to add such a core feature to Obsidian?

2 Likes

Hi,
I also noticed this a while ago and I am wondering why such a basic feature is not yet available. Especially if a plugin is already coded, you could just copy it. Hope it will make it into the core :slight_smile:

Throwing my support in too. This has become second nature on Slack, Github, Notion, and even Discourse (this forum), and Obsidian should add it too. This shouldn’t be something I need to rely on a plugin for.

1 Like

This is absolutely the right call, IMO. A lot of different tools do this already (Slack, Figma, Linear, Notion, ClickUp to name a few that I know of), and is becoming the standard. I even expected Obsidian to support this and pasted a URL myself a few times, only to get the URL posted verbatim :frowning:

1 Like