How to include external files in your template (JS, CSS, etc.) | [Guide]

This might be a limitation caused by the Anki webview itself. I can replicate it by using Anki in window-mode (not maximized):

Kooha-2021-07-28-16_25_21

The viewport information seems to be off when the window is not maximized. Tippy (actually Popper) thinks it has enough space for the tooltips.

@01101 a quick fix for this would be to change the default top positioning to bottom:

tippy(tip, {
            content: strike.innerHTML,
            placement: "bottom",    // <- changed to bottom (from top)
            allowHTML: true,
            theme: "sample",
            interactive: true,
            trigger: "mouseenter click",
            animation: "scale-extreme",
            appendTo: document.body,
        })

The following idea is certainly worth looking into:


An advantage of the <strike> approach is that we can easily batch-edit them via RegEx into another format. Should the abovementioned idea get implemented one day, I can help you with that switch.

1 Like