[Add Hyperlink] click doesn't open browser


I Installed Add Hyperlink add-on and gave some links to some words in a note. Then I start to review and when I click on the links, they won’t be open in browsers to lead me to their webpages!

I published this add-on.

There can be hundreds of reasons why this happens. To fix this you need to help narrowing down the problem and do some diagnostic work on your computer.

Do the checklist from https://anki.tenderapp.com/kb/problems/when-problems-occur

  1. Does the problem persist after restarting your computer in Anki 2.1.35 without any other add-ons?

  2. Copy and paste a link from your browser into a new note/cad in Anki. Anki 2.1.35 should automatically format it as hyerplink that you can click during review. When you review this note: Does your browser open as expected.

  3. For a note that has a hyperlink made with my add-on that doesn’t work in the browser: Post the html source code of the field that contains this link. To do this put the cursor into this field and from the upper right of the editor where you have buttons like “b”, “i”, etc. click on the “hamburger menu” (three horizontal bars), then “edit html”. A window opens. Copy and share what’s shown in it. When you post the html source code in this forum make sure to wrap it in backticks like this so that it’s rendered as code in a fixed width font:

[The content you copied from the field]
1 Like

I disabled all add-ons except yours and restart the computer, then back to the notes I put links, this time when I hover the mouse, the cursor changes to a hand icon and recognize the link, but when I click on it, nothing happen and the link address doesn’t open in a browser. Copy and paste a link into a note or select a word and give it a link via your add-on give the same result and just knows it’s a link, but can’t open to check and see web pages.

The Html code of the field with four links in it:

[<div>A generalist is an animal which
consumes a variety of food sources and is usually able to adapt to more than
one ecological niche. A specialist animal, by contrast, generally favours a single food
source and terrain type. <a href="https://en.wikipedia.org/wiki/Omnivorus">Omnivorus</a>, which eat both plants and meat, are
generalists by definition, but&nbsp;<a href="https://en.wikipedia.org/wiki/Herbivores">herbivores&nbsp;</a>which eat a
variety of plants are also considered generalists. A well-known example of a
specialist animal is the&nbsp;<a href="https://en.wikipedia.org/wiki/Koala_bear">koala bear</a>&nbsp;which subsists
almost entirely on&nbsp;<a href="https://en.wikipedia.org/wiki/Eucalyptus">eucalyptus</a>&nbsp;leaves.</div>]

the html source code looks good. So my add-on works as expected. When I put this html source code in a note and review its card I can open the wikipedia links in my browser.

Copy and paste the text from your note and past it into Word or LibreOffice Writer and then click a link: Does it open in your browser.

If not, it’s a general problem that’s not related to anki. There are better places to ask.

If it works outside of Anki: I have no idea at the moment.

1 Like

Copy and paste the text from your note and past it into Word or LibreOffice Writer and then click a link: Does it open in your browser.

The links work well in Word and pdf file, open them in the browser normally, but it’s strange why doesn’t happen in Anki like those.