Add Hyperlink [Official thread]

Dear Ijgnd,

Thanks for your prompt answer. You are right it looks like it’s an Anki issue. You can close my request as solved.

I still appreciate using the Add Hyperlink add-on.

Steph

Please add it to make it look like this

@Yoekr: That looks nice. I’ve added this to the todo list but I don’t have time to work on this for the next year.

Hello @ijgnd,

Thank you for making simple but very helpful add-on ‘Add Hyperlink’.
Back in the day, this add-on worked perfectly, but now I can see some problems.

This is NOT a serious problem for me, but hopefully you would recognize this case.

Problem

Wherever the current cursor is, hyperlink is always added on top of the flashcard

Steps to reproduce

  1. Start Anki2
  2. Press ‘a’ to add a flashcard
  3. Write following contents into the card for example:
aaa

  1. Make sure the text cursor is at the end of the flashcard.
  2. Press Ctrl+Shift+H to call ‘Add Hyperlink’ add-on.
  3. Specify ‘Link to: link’ and ‘Text to display: text’ and select ‘OK’ to insert a hyperlink.

Expected result

The flashcard should look like the following, where text encompasses hyperlink information to link

aaa
text

Actual result

The flashcard was actually like the following. The hyperlink text is added on top of the flashcard.

textaaa

My environment

It first happened on my main machine.

  • Fedora 37
  • Python 3.11.0
  • Anki 2.1.55 Qt6 (, and 2.1.55 Qt5)

Just in case, I also confirmed the issue could be reproduced in the following environment.

  • CentOS Stream 8
  • Python 3.9.14
  • Anki 2.1.55 Qt6

Additional information

I also tested on older version of ‘Add Hyperlink’ and ‘Anki2’ by reverting either ‘Add Hyperlink’ or ‘Anki2’, but I couldn’t see the problem fixed.
Maybe I needed to revert both to the specific version to find the point of time when the issue was introduced.
Sorry for the non-helpful information.

@ijgnd: Sorry for posting multiple times, but I also found another similar issue.

Problem

With the text selected, press Ctrl+Shift+H to insert a hyperlink, then hyperlink is added to the different place with a different text, and with a correct link.

Steps to reproduce

  1. Start Anki2
  2. Press ‘a’ to add a flashcard
  3. Write following contents into the card for example:
text
  1. Make sure that text is selected.
  2. Press Ctrl+Shift+H to call ‘Add Hyperlink’ add-on.
  3. Specify ‘Link to: link’ and leave 'Text to display: ’ to ‘text’.
  4. Select ‘OK’ to insert a hyperlink.

Expected result

The flashcard should look like the following, where text has hyperlink information to link

text

Actual result

The flashcard was actually like the following. The hyperlink link is added on top of the flashcard, which links to link.

linktext

thanks for these great bug reports. I’m really busy at the moment so I can’t look into this before early March. I’ve added this to my todo list.

1 Like

Thank you too for sparing your time to reply. Please take your time as I still enjoy using hyperlink with Anki.