highlight in answer field a word specified in separate filed

sabayon11's Avatar


19 Dec, 2019 11:55 AM

Please contribute finishing java script. The script is here:


Or alternatively create add-on.

The request is still valid, because proposed solution is only half-finished and doesn't cover all instances / forms that word can have.

What it is supposed to do:
would highlight the reference word in learning mode (obviously: in "Answer" field), the word that is specified in reference field, for example in "Headword" field (but the field name could be defined in settings).

I wish it could also highlight word when it has defined endings like: -ed, -ing, -s and also when word begins with capital letter. I mean the best would be if this endings would be also highlighted along with reference word, for example when reference word is: work the script would highlight words such as: worked, working, works.

There might be a problem with some plurals, for example amenity → amenities, but I think this can be solved when I will repeat in template this script for another field that has inflection.

I learn English so this suits my needs but other users may have other preferences.

Just removing \b from script is not a good solution because when audio file name has a headword in it with some signs like _ or numbers it causes errors in displaying card correctly.

The feature of highlighting a specific word is implemented for example in "Search in add card dialog" add-on or in "Highlight Search Results in the Browser". The feature is common in many dictionaries, so you should already know it is quite useful.

That would help make this word (the word that I actually learn) be more visible when I have many sentences as an example and focus attention on it.

I have no programming skills. I don't even recognize if linked script is JS or python or html/CSS.

Volunteers are welcomed, as for now I can't afford sponsoring.

And some variation of this code:

I will try to learn JS myself but it will take a long time. So I linked to it in case someone is interested.

Sorry, I just realized this should be in Community section of the forum.

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

Keyboard shortcuts


? 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