Thank you so much for that!
I’m pretty new to Obsidian, so the whole Templater thing (and plugins in general) are very foreign to me, but I guess I was able to make it work. Let me share what I have to see if you can confirm this is the right way to add templates and all that:
So I installed the Templater plugin, then created the folder “_Templates” on the root of my vault and added a new note “Automatic Markdown Links”:
Inside, I added your script:
In the Templater settings, I selected the folder:
Then added the file to the Hotkeys section:
I set the hotkey:
So now when I use ⌘+V, it pastes the text or link the way it used to. When I use ⌥+V, it pastes the link using the markdown version
It’s working. I just want to make sure that the whole process is correct?
Also, if it isn’t too much to ask (if it is, no worries, I already appreciate your time and help):
Is it possible for the script to check what the clipboard contains such as https, https, or www. (including the dot at the end, to make it more specific)?
I would like to use the same shortcut for both scenarios, so I don’t have to use 2, and the script would paste it the “old way” if https, http, or www. isn’t present, and if it is present, it uses the way you scripted.
Again, if this is too complex, it’s totally fine. I can probably create a Keyboard Maestro macro to achieve the same thing, but if the script could do that automatically, it would be a cleaner solution.
Thanks again for your time and help!