I often have to past links into my notes which all have a similar url: https://some.where/id-XXXX
I am looking for a way where I only type [id-XXXX] and Obsidian will automatically expand the short-hand to the full url either as [id-XXXX](https://some.where/id-XXXX) or just https://some.where/id-XXXX. Ideally this would happen automatically after typing the ID in brackets, but I would also be happy if I had to press some kind of key-combination or close and open Obsidian/the note to trigger the changes.
I haven’t found any discussion which seems to ask for the same thing. If there are any please point me there. And since I’m not sure if this is the right part of the forum, please move the question if necessary.
Templater could be a good solution if the IDs and their corresponding links follow a consistent pattern.
In the script, you can retrieve the current note’s content, use regex to find all IDs, replace them with the correct links, and save the updated content. You can also assign a hotkey to the Templater template, making it easy to run on any note.
EDIT:
Something like this would work. If you are going to use it, make sure the regex covers you use case. Especially, when letter case matters or your id contains special symbols.