Once you’ve done the above, delete everything above this line.
Steps to reproduce
Add an attachment to the vault.
Open a new/existing note.
Attempt to link to that attachment using markdown link with custom display text (e.g. Link.
The text will display as “Link” when clicking off as you would expect.
When you click the hyperlink, instead of taking you to the attachment it creates a new page with a small amount of the attachment text with brackets still included (e.g. “[[Attachment”)
I have tried this on mobile as well and the “Link” instead just cannot be clicked.
I expected the attachment link to display with the custom text - “Link” - Then display as “Link” when clicking off. Then allow me to click the “Link” and take me to the underlying attachment.
Actual result
Clicking the link creates a new page “[[Attachemnt”.
Environment
SYSTEM INFO:
Obsidian version: v1.4.14
Installer version: v1.3.7
Operating system: Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64 22.3.0
Login status: logged in
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on
Maybe you’re right and I’m trying to do something impossible.
I was trying to get WikiLinks to display with custom text. So I could link to a page or attachment but display different text. I can reproduce this by using square brackets around the name I want displayed followed by normal brackets around an Obsidian URL link to where I want it to go.
I just thought you would be able to type “[Name I Want Displayed]” then immediately ([[Link to Note/Attachment]]) and it would display with the custom text that would go to the linked page when clicked.
Using the Obsidian URL in place as above seems like a good (but slightly longer) way of doing the same thing. Obviously, if I move the file, the link will break, unlike the WikiLink. Thanks for your help. If I’m missing anything please do let me know.
Dammit. I was looking in the completely wrong place and went down a rabbit hole of trying to use Markdown links with WikiLinks rather than this obvious solution. Thank you @ariehen!