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
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
@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.
Wherever the current cursor is, hyperlink is always added on top of the flashcard
aaa
Ctrl+Shift+H
to call ‘Add Hyperlink’ add-on.The flashcard should look like the following, where text
encompasses hyperlink information to link
aaa
text
The flashcard was actually like the following. The hyperlink text
is added on top of the flashcard.
textaaa
It first happened on my main machine.
Just in case, I also confirmed the issue could be reproduced in the following environment.
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.
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.
text
text
is selected.Ctrl+Shift+H
to call ‘Add Hyperlink’ add-on.The flashcard should look like the following, where text
has hyperlink information to link
text
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.
Thank you too for sparing your time to reply. Please take your time as I still enjoy using hyperlink with Anki.
@stopendy: I finally looked into your two bugs reported:
btw: what do you think about the new radio buttons to prefix incomplete urls with http:// or https:// ?
Although @ijgnd could confirm that he/she could reproduce the issue, but I will add some information to reproduce it.
In step 4, you need to select exactly the word text with shift + right arrow
or something. If you select text
with Ctrl+A
, where selection includes a new line character, you couldn’t reproduce the issue.
- Make sure that
text
is selected.
@ijgnd: Thank you very much for your support on solving two issues I reported! I could confirm they are solved as you said.
btw: what do you think about the new radio buttons to prefix incomplete urls with http:// or https:// ?
I guess this enhancement is great in terms of added stability, and ability to reflect user preference.
added stability
I tested with several link texts and checked what link was actually inserted with the current release version of ‘Add Hyperlink’ (2022-05-23). For example, when I specified link
as ‘Link to:’, the hyperlink URL I finally got was http://127.0.0.1:33421/link
.
link: http://127.0.0.1:33421/link
localhost: http://127.0.0.1:33421/localhost
localhost:8080: localhost:8080
Your test release 2023-04-22
is great in terms of stability. Using this version, I could get some predictable results as following:
link: http://link/
localhost: http://localhost/
localhost:8080: http://localhost:8080/
I know “inserting a link without ‘http://’ or ‘https://’” is a corner case, but I guess this enhancement contributes to the stability of “Add Hyperlink” add-on.
ability to reflect user preference
I noticed that I could configure the default value of the radio button from the add-on configuration window (*). This is great! People who want to just add links without ‘http://’ or ‘https://’ can opt out by specifying ‘nothing’, and they can also set ‘nothing’ as default with this option. Before the release, maybe you can add the description for this option so users can figure out how to use this option.
(*) How to edit the option:
1. Open Anki
2. Navigate to [Tools] > [Add-ons] (Ctrl+Shift+A)
3. Select "Add Hyperlink"
4. Select "Config"
5. Locate the configuration item "prepend incomplete url default" and choose one of "http", "https", or "nothing"
Thanks for your great feedback… I just noticed that the bug that text is always inserted at the beginning of a field still occurs on my other machine. So the bug is not fixed. I uploaded what I had - maybe this is at least an improvement over the current situation. I’ll look into this again.
Thank you for the release!
I just noticed that the bug that text is always inserted at the beginning of a field still occurs on my other machine.
I’ve just figured out how to reproduce the bug that text is always inserted at the beginning of a field.
aaa
bbb
Press Ctrl+Shift+H
to call ‘Add Hyperlink’.
Assign following values to the add-on. nothing option is the key to reproduce the issue.
Link to
: aaaprepend missing scheme
: nothingText to display
: bbbOnce you reproduce the issue, the bug happens again even if you select http/https as prepend missing scheme
. When you close the card editor, the issue won’t happen until you select nothing as prepend missing scheme
again.
As long as we use http or https as prepend missing scheme
, this issue won’t happen.
I tested on the following environments.
@stopendy : I just uploaded a new version of “add hyperlink” that should fix the issue of the hyperlink being inserted at the beginning of a field. I think it was a random timing issue since 2.1.50. Could you update your addons, restart anki, and try again. Let me know if you run into problems. thanks.
@ijgnd : I’m very grateful for solving this complicated issue of the hyperlink being inserted at the beginning of a field" I could confirm that this issue has gone in Anki 2.1.61 with “add hyperlink” version 2023-06-18. With the fixes and enhancement that were added recently, “add hyperlink” has become even more perfect!
Since the issue is confirmed to be solved, you can remove “known issues” information in the following add-on download page.
Add Hyperlink
Cheers.
@stopendy : Once more thanks for careful testing (and reading the addon description). Your input really helped.
if someone is interested:
today i just found there is no popup tooltip to show what’s the content of the link, the URL.
i asked in the forum,
then i asked gpt4.
shows URL tooltip like this:
since the link inside cloze is also hidden before the cloze is revealed, it wont disclose the answer to the user.
I’m interested. Could you post the code?
let me dig out… thanks.
been passed several days.
it contains, for basic or cloze, the code and the instructions.
simply say:
for basic, edit the basic note type and add 1 single code block ( i add at end)
for cloze, edit the cloze note type and add 1 single code block ( i add at end) + in every single “reveal” function (depends, i found only 1 in “cloze reveal 1 by 1, by user O”) , add a similar code block.
my discussion /w gpt4 is also posted as instructions.
provided i got 0 experience on javascript, these files will enable everyone to implement it.
enjoy, thanks
btw, it is dual licensed, you could use the GPL3 for the public, thanks.
thanks for sharing. I should probably include this in the addon description. When I have more time …