Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links in annotations don't work #382

Open
adbrei opened this issue Apr 1, 2024 · 2 comments
Open

Links in annotations don't work #382

adbrei opened this issue Apr 1, 2024 · 2 comments

Comments

@adbrei
Copy link

adbrei commented Apr 1, 2024

I can add hyperlinks (e.g., URLs and links between files) in the pdf annotator block under "Annotations" and "Page Notes", and when I preview or save the annotation the link font color changes and the text is underlined. However, when I click the hyperlink nothing happens: it does not open the webpage or linked file. Is this a bug, or is there another method I should use for hyperlinks? Thank you.

@kyleellefsen
Copy link

kyleellefsen commented May 4, 2024

+1.

My system:

  • MacOS 13.5.1
  • Obsidian Version 1.5.12
  • Annotator Version: 0.2.11

Markdown-style hyperlinks do work on Cmd-click, but they leave the current page. Nothing happens on a regular click.

@tillo-eaux
Copy link

Hi :)

I have found a solution to this. As this is mostly a hypothes.is issue, which prevents Obsidian from handling the markdown link, I instead tried supplying a "file:///"-protocol hyperlink, but that too did not work. However Obsidian has its own URI system and associated hyperlink protocol.

As you have already noted, CTRL-click or CMD-click is required to follow links in hypothes.is. This is also the case for my workaround.

Using Obsidian URI a markdown link like
[[my note|Link to my other note]]
in an annotation becomes
[Link to my other note](obsidian://open?vault=<vault id>&file=my%20note).
Note that the vault id needs to be supplied correctly, however the entire hyperlink can easily be obtained with a right click on the note you wish to link to and the menu option "Copy Obsidian URL".

Additionally, using the Advanced URI community plugin further options may be specified. For example, it is essential to me that the linked note opens in a new tab. With Advanced URI the link
[[my note|Link to my other note]]
in an annotation becomes
[Link to my other note](obsidian://adv-uri?vault=<vault id>&file=my%20note?openmode=true).
Note again the vault specification and that Advanced URI supplies its own menu option, supports hotkeys and has many more powerful features that I am happy to be able to use together with Obsidian Annotator.

I hope this approach works out of the box on your systems as well and that the slight side step going via the Obsidian URI instead of a plain markdown link is equally acceptable to you as it is to me. If that is the case, I think we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants