Why does the text of my cards appear as a block in night mode?

Hi everyone,

I’ve encountered a strange problem with night mode Anki.

On some of my cards, part of the frontside text appears as a block, or as if the characters have been covered. But when I select the text, the characters become visible.

What I’ve found so far:

  • The issue only happens in night mode. When I turn off the night mode, the characters show perfectly.
  • The problem does not happen to all cards, only to some random Japanese-learning-cards. All my English cards are fine.
  • The problem also affects the cards on my iPhone.
  • This started happening only recently, after a few days of not using Anki, and I came back to this. It never happened before.
  • The operating system is macOS 13.7.6. Restarting my mac or installing the newest version didn’t help.

Here are some screenshots:




Has anyone run into a similar problem? What could be causing this? Turning off the night-mode is an option, but it would be nice to know if there’s a better solution.

What does the html of that field look like (not the templates you showed us already)? Maybe it has some background-color styling applied, that isn’t visible in light mode but visible in dark mode.

1 Like


Thanks for replying, I checked the html and found the “background-color” thing. That explained the block. But I still wonder why some of my cards got this phrase while others don’t. Anyway appreciate the help!

If you copied and pasted text from a web page or some other application when creating these cards, this styling may have been copied from the original source.

4 Likes

Find & Replace should help you clean that up in your notes. Be careful not to remove any of the formatting you actually want, but it’s pretty safe to try things if you check them and Edit > Undo anything that turns out wrong. [It won’t hurt to make a fresh backup before you start too – File > Create Backup.]

I’ve written up some basic advice for this kind of editing – Edit Multiple Fields in Multiple cards at once - #6 by Danika_Dakika . If you want help with your particular string feel free to post what you find.

2 Likes

To prevent this from ever happening again, turn on the option to paste as a plain text in the settings. You can still hold shift to paste with HTML.

2 Likes

Thanks for replying! But to clarify, I’m quite sure I didn’t get this phrase from website cause I typed them myself. Usually when creating new cards, I type the part-of-speech tag (<名> in this case) myself the first time, and after that I just copy the tag and paste it to new cards. So copy-paste is involved, but only from content I wrote myself, not external sources.

Thanks for your advice! I’ve already cleaned up the phrase and it’s all back to normal now.

1 Like

Thanks! That’s really helpful. I never paid attention to html before. Although I’m pretty sure I didn’t get this phrase from external sources, I’ve already turn it on just in case.

Read the discussion in this this topic for a detailed answer.

But basically, Anki Desktop is treated like a website. So you, in a sense, did copy paste from a website!

2 Likes

I see! It makes perfect sense now. Thanks for pointing that out.

1 Like

Personally, I always use “Allow HTML in fields” selected. In that way I can distinguish descriptions of e.g. grammatical function (e.g. intransitive) from the actual meaning of the term.

If you use the Browse window, you can search for any notes containing e.g. “<” and then clean them up, if you have accidentally included some HTML in the fields.

If you sometimes copy information or words from a web site, copy it to a simple editor like Notepad (in Windows) or Text Editor or xEd (in Linux). These will automatically drop the HTML formatting as they cannot use it, and then when you select and copy from these simple editors, you can paste the cleaned text into your Anki card.

1 Like

Thanks for replying! I’m a mac user and I asked chatgpt to see if there is a simple editor you mentioned for macos, and it gave me some options. I’ll try it.

Apple’s default TextEdit is simple enough for this purpose. In settings, choose show HTML. (And when using characters that aren’t ASCII, encode in UTF-8)