Custom link using regex

What I’m trying to do

NotePlan has this neat feature where you can build custom links using regex: Create Custom Links - NotePlan Knowledge Base

I’m wondering if it’s possible to replicate the same functionality in Obsidian. An example use case is:
Say I use a ticketing system where my work is tracked. Each ticket has a unique ID and I frequently link out to the system in my notes. I want to be able to type out a shortcut like T#12345 and have it automatically render as a hyperlink to the correct url (e.g.
https://ticketing.app/12345), rather than having to copy-paste the whole url.

Things I have tried

Searching through the forum and plugins for an existing solution.

Any help is appreciated. Thanks!

2 Likes

If you use the Templater plugin, you could do this with a hot key and prompt. Something like this (this is off the top of my head…test before using!!

<%*
ticket = await tp.system.prompt("Ticket Number:")  ?? "Untitled"
tR+= "http://mysystem.example.com/" + ticket
%>

Actually, you will have to wrap the HTTP address in [Name](<LINK>) but you get the idea.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.