Make the default link text for links to text in other files adjustable

So, I did do a search for this, but nothing obvious jumped out at me. I’m using obsidian for studying and having links to the lecture slides or a specific page of a book is a very useful thing to have in my study notes. So I have a PDF open, and I highlight a bit of text, and select the “copy link to selection” option and then drop that link into the document I’m working on, which then appears like this:

textlink

The thing is that I don’t actually want the link text in the document I’m working on to read “STATS383-Exam-2022S2-1, page 6” because the whole point of the link is that I don’t actually need to know that, that information is already embedded in the link itself, I can just click the link and it will take me straight to the relevant document, page, paragraph, and sentence. And so every time I paste one of these links I have to go through and delete the text that is already there and replace it with the text I actually want. This is tedious.

Proposed solution

What I would like to see instead is an option that, when the link to the text in the other document is pasted, there is by default no link text at all, like so:

textlesslink

This would mean that whatever text is desired can just be directly entered, rather than having to first delete the default text. Basically, just have some option that allows more control over the default behaviour of link text.

The PDF++ plugin allows you to customize the format of display texts (i.e. the text next to the pipe |).

If you don’t want to include a display text in your link, you can create an empty display text format, like so

I think what you’re seeing is the result of the link containing a path. By default a link only contains a path if it’s needed to distinguish between multiple files that have the same name. There’s also an option to always use paths. When a link has no path, no link text is added. What you’re requesting used to be the default; it was changed so that all links would only show the file name (in live preview) instead of some of them having unwieldy paths visible. I thought there was another request asking for an option, or at least discussion, from when the change was made, but perhaps I’m misremembering.

@CawlinTeffid That’s how the link auto-suggester (the one that pops up when we type [[ in the editor) works, but in fact, the behavior is different when you copy links from the “Copy link to selection” context menu item in the native PDF viewer.
It always inserts the full path regardless of the user’s setting, and the display text (the text next to the pipe) is also always inserted.