Help me delete this annoying white box when I review

nakfbadf's Avatar

nakfbadf

25 May, 2020 02:11 PM

I asked the staff first with no luck. This issue is preventing me from reviewing. I had plans to maybe share my deck when I finished polishing it but if I can't fix this I fear I'll quit using Anki altogether (yes, I'm feling very frustrated).
Basically, I've been using this add-on called Fast Word Query which has been very useful to me. Yesterday, I deleted and installed it again and I queried one or two new cards with it. The add-on added examples and definitions from a dictionary and everything seemed fine. However, I noticed that since then the format has changed in every field of every card I've ever used Fast Word Query. I don't know how or why this happened. Two days before, the format was standard and the font size hovered around 12 for all letters. I attach images so you can see how it looks now whenever I review cards and how the fields look like when I try to edit them. The new white box is very annoying, some words are VERY tiny and uncomfortable to read and the format is overkill (plenty of color, italics, etc). Any ideas how to fix it? I wish I could delete all format in those particular fields at least...

I restored an automatic backup and it didn't help.

Also, I don't speak chinese. However the add-on automatically translates everything into chinese (this is a long-standing problem). Do you know any "regular expression code" that finds chinese uni code so I can delete all chinese characters using "search and replace" on the browse??

  1. 1 Posted by ijg on 27 May, 2020 09:05 AM

    ijg's Avatar

    maybe the white box is part of the source that's in your note. You wouldn't see a white box in the editor because the editor also has a white background color.

    You could have a look at the html source code of the field "Collins Definition" in the editor when the cursor is in the field with the shortcut ctrl+shift+x.

  2. 2 Posted by nakfbadf on 27 May, 2020 02:30 PM

    nakfbadf's Avatar

    Help you so much for your help! Maybe we are close to finally fix this!

    1- Yesterday I discovered that this problem only trigges after syncing. If I import this deck from a new profile and I disable syncing, everything is fine. If I sync, the white box appears.

    2- Now that you told me to look at the html source code, I found the lines that are causing this problem, they are at the very beginning:

    <link type="text/css" rel="stylesheet" href="_youdao_wrap.css"><div class="youdao"><div id="auth_sents_part_contentWrp" class="content-wrp dict-container"><div id="auth_sents_part" class="trans-container auth_sents_part "><div class="content">

    If I delete them, the white box disappears and everything gets back to normal.

    3- Funnily enough, syncing doesn't change the html source code at all, but for some reason it makes them "active". I don't have any knowledge about this though, I discovered the code that were causing trouble by trial and error.

    4- Deleting that code solves the problem only for the single note I'm editing. Is there any way I can delete it from all cards? Only 2 or 3 fields seem "infected".

    Thank you very much again.

  3. 3 Posted by ijg on 27 May, 2020 04:30 PM

    ijg's Avatar

    I have no idea how sync could affect this either.

    For removing unwanted code there's the built-in search and replace feature, see https://docs.ankiweb.net/#/browsing?id=find-and-replace

    you can also export, edit with your favorite text editor or libreoffice calc etc and reimport. To update existing notes the first field must be unchanges. For this some people use the "Add Note ID" add-on.

    Before you try any of this make sure to know how to restore an older version (have backups and know how to restore them ....).

  4. 4 Posted by nakfbadf on 27 May, 2020 09:16 PM

    nakfbadf's Avatar

    Oh thank you so much! I didn't know I could find and replace html code. You solved my problem.
    One last question: My deck has a lot of chinese in it I'd like to remove. I think it is possible, using find and replace and regular expressions, to delete all chinese characters. The thing is, I don't know how to write a regular expression code that does this, it is way beyond my understanding. Do you happen to know? I've been told I should use an unicode and I've looked online but nothing ever worked with Anki. Also, I'm afraid that if I do manage to delete all those characters, my cards will be filled with empty lines.

  5. 5 Posted by ijg on 27 May, 2020 09:30 PM

    ijg's Avatar

    I have no good idea. It's easy to get nasty side effects. A proper fix would be changing the add-on so that these fields are not imported in the first place ...

Comments are closed, but you can start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac