As the title says, I would like to create tooltips that show up as I hover the pointer over them in the card, with text and images in them, spontaneously with a shortcut as I am reviewing (with the help of the Edit Card during Review addon).
The previous Tippy Tooltip addon is broken and I tried contacting the author but it was to no avail…
This is the Javascript code from ChatGPT if this brings up any ideas (this of course did not work still)
The javascript you got from ChatGPT makes me think that you prompted it with something like “I want to create tooltips …” so it gave you code where you create and edit tooltips within the HTML by pressing ctrl+e, ctrl+s etc.
I don’t know if you need javascript code to handle this as the basic tooltip code shown in the W3 tutorial above requires only HTML and CSS. I’m assuming your tooltips content comes from the note fields. Then the gist of it is that you’d do things like this in your card template
Card template
Add the CSS from the tutorial for .tooltip and .tooltiptext to the card CSS. Then do this:
If the text you want tooltipped is not the whole field but some individual words in the field, then you can do the same thing by adding the HTML as part of the field content:
Some_note_field:
Also add the CSS to card CSS
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<div className="tooltip">
Curabitur ipsum turpis
<div className="tooltiptext">
Pellentesque non mauris id dolor faucibus laoreet. Nullam tellus metus,
</div>
fringilla sit amet hendrerit in, fermentum nec felis.
</div>
But if there’s some way you want to generate tooltips based on the existing structure of the field content, then you’d need javascript to 1) identify those parts 2) convert those parts to use the tooltip + tooltiptext div structure.
But if there’s some way you want to generate tooltips based on the existing structure of the field content, then you’d need javascript to 1) identify those parts 2) convert those parts to use the tooltip + tooltiptext div structure.
Yes, I think that is what I want. I want to be able to take some words inside my card cloze note and convert them into a box, where I hover on it with a pointer for it to then show up as a tooltip upon hovering.
Also, I would really like to be able to do this with images and put them into tooltips. That is my main target.
All this with the help of a shortcut (like Ctrl+T or something)
This is my cloze note field
{{edit:cloze:Text}}