Tippy Tooltips [Official Support]

Tippy Tooltip’s js script injected via editor_will_load_note hook causes an error:

Uncaught TypeError: Cannot read property 'editingArea' of undefined
    at Object.initNote (tooltip_injector.js:18)
    at <anonymous>:1:263

Which results in js script added by other addons via editor_will_load_note hook after Tippy Tooltips, to not run. This bug is observed on Anki 2.1.45, and seems to be fine on 2.1.49.

Thanks for the report! (also thanks to @CUB_Luke for notifying me about this issue too).

I forgot to change a selector for the fields for 2.1.49 and below, which resulted in the error you mentioned. I just uploaded the fix.

@BlueGreenMagick Sorry for the hassle this has caused. I should have tested the legacy version more thoroughly.

1 Like


Unfortunately the link to the “Sample note type” doesn’t work anymore. Could you restore it?

I unfortunately do not manage to integrate the tooltips; mainly because I do not know how exactly to integrate the code in Anki. With the sample I would certainly manage it.

Thanks and best regards


I once replaced the old sample and didn’t update the link in the AnkiWeb description. Once I publish the project on GitHub, this will get a bit easier :slight_smile:

Thank you very much!

Is there a way to close the tooltip when a new card is displayed? If I continue clicking with the tooltip open, it still shows it on the new card, and if it has no tooltip, it cannot be closed. This happens at least on iOS.

Can anyone help me with this problem? only appears on the ipad

Sorry for the long wait. I’m a bit busy this month, but will try to find the time in the next few days to take a look at this issue.

Same goes for @Well’s report, altough that might prove to be a bit trickier since I don’t have access to an iOS device atm.

A general word on the sample notetype

I originally didn’t intend to create a feature-rich notetype along with the add-on. It was really just about enabling easy input of the tooltip syntax in the editor. I wanted to leave the template implementation free to the user.

But now I think it would be better to provide a standard script that can be added to any template with the Asset Manager add-on.

It will take some time, though. Maybe in February.

I understand, thanks for your attention. I’m anxiously awaiting the resolution of the problem because I don’t know how to handle any kind of language. :sweat_smile:

I’m not sure this is to be expected, but when we click Tab it always opens the middle word first:

With Shift+Tab everything is fine:

And congratulations on the work, I met this today, it is extremely useful.


This is better done within the tooltip script (You can change the trigger that closes tooltips. By default it’s set to close on clicks outside).

Can this change be made only for ankidroid? I think it’s interesting to leave this option in anki for desktop.

@kleinerpirat , thank you for your attention, I’m really entering this world of JavaScript, very exciting, but still my knowledge is very limited.

I realized that the best option would be to modify the ClozeAdv code (ClozeAdv ( Cloze Advance ) - AnkiWeb), where we would disable the flipToBack function when inside cloze it contains <a> element.

Don’t worry I’m working on it. :slight_smile:

Just to suggest an improvement, when we trigger the tippy it remains activated even when moving from one card to another:

Obs: I tested some versions of anki and this happened in all of them, on ankidroid it works fine.

That’s to be expected. Thanks for the suggestion! I will fix these things as soon as my exams are over (next week).

1 Like

Hi, I really enjoy your addon.
Is it possible to do something for that it could be possible to see the tippies in the preview tab of the browse menu ? I can only see them if I stay in the simple browse menu. Thanks in advance for your help.

In fact, it doesn’t work for me. I tried to study and to see my tippies in review and it doesn’t work. I just see a kind of “hyperlink” but i cannot click or other. My anki version is 2.1.49.

Look this post

Thank you so much for this super useful addon!

Unfortunately it’s not working for me on 2.1.50 and higher on macOS. Works fine on 2.1.49.

Edit: only the editor popup isn’t showing up. The HTML editor shows the generated blank tooltip, after inserting something the rest works fine.

Any suggestions?

Thanks in advance :slight_smile:

Since I cannot reproduce the issue, I’ll need you to download AnkiWebView Inspector - AnkiWeb, then right-click somewhere on the editor and choose “Inspect” to open the dev-tools. Navigate to the “Console” tab and check if there’s any error popping up when you perform a tooltip insertion.

I’ve been planning to refactor the add-on anyway (I’ve noticed a few hickups myself), so there’s a good chance your issue would get resolved as a side-effect.

1 Like

Thanks! Done, this is error pops up:

editor.js:7 Uncaught TypeError: Cannot read property 'querySelector' of undefined
    at w (editor.js:7)
    at Array.M (editor.js:7)
    at HTMLButtonElement.o (editor.js:7)
    at note_creator.js:33
    at Array.forEach (<anonymous>)
    at HTMLButtonElement.$t (note_creator.js:33)
    at HTMLButtonElement.v (note_creator.js:34)

Hello, first, thank you for the useful add-on.

Anki 2.1.54 (rc1), Windows 10:

Most of the times, when I try to add a tooltip, the tooltip menu appears in the wrong position, i.e. always at the top-left of the screen (no matter which field I’m currently modifying)

This tooltip menu is also buggy.

  1. I cannot click on the red “x” button to close it
  2. If I write anything in it and then click on the green “🗸” button, an empty tooltip is added instead.
    (Here is what I see after writing something in the tooltip and checking the console

I can then open and edit this empty tooltip and it will work as expected.

This behaviour appears to happen both in the Add window, in the Editor and in the Browser.
EDIT: if I open the editor of a note that already contains a ‘tippy tooltip’ and click on the “tooltipped” words, the tooltip editor does not open. It becomes responsive to clicks only after I add a new tooltip (following the steps listed above)


  • when in the Browser, the dotted underline below words is sometimes not displayed (but I still can click on them to edit the tooltip)
  • when adding tooltips, &nbsp; are often added before and after the tooltip (not sure if this is due to the add-on)
  • when deleting tooltips, sometimes some other portion of the adjacent HTML code is also deleted (I cannot recall the steps to reproduce it)

It works well before version 2.1.49 all the time. But when we arrive at 2.1.54. Such this is my content in my tippy:

ResourceFunction["PlotVector"][{{3,1},A.{3,1}},PlotLabel->"m=(3,1)关于y=\!\(\*FractionBox[\(1\), \(2\)]\)x的反射变换"]

It will be this:
If you copy from the editing area. It will be:

ResourceFunction["PlotVector"][{{3,1},A.{3,1}},PlotLabel->"m=(3,1)关于y=\! Mathjax ,  Mathjax ]\)x的反射变换"]