🎨 Cross-Field Highlighter addon - spotlight word in text [support thread]

Customize formatting

CFH supports 4 formats: Bold, Italic, Underlined and Yellow background.
In HTML these formats are represented like:

<b class="cross-field-highlighter">Bold</b>
<i class="cross-field-highlighter">Italic</i>
<u class="cross-field-highlighter">Underlined</u>
<mark class="cross-field-highlighter">Yellow Background</mark>

User can customize these formats using CSS styles in card template.
Example of CSS style:

.cross-field-highlighter {
    color: DarkSlateGray;
    background-color: LightGray;
    font-size: 1.5em;
    font-family: sans-serif;
}

This style on screenshot:

If you have more questions, please ask them in this thread.

New release of Cross-Field Highlighter addon (v1.2.0):

  1. [FEATURE] Add thousands separator to numbers
  2. [FEATURE] Handle curly (smart) quotes (“”)
  3. [BUG] Editor buttons do not work in cards mode
  4. [BUG] Do not show statistics from Editor
  5. [BUG] Adjust size of Destination layout
  6. [BUG] Duplicate buttons after profile switching
  7. [MISC] Execute unit-tests on MacOS

New release of Cross-Field Highlighter addon (v1.3.0):

  1. [BUG] Reading state on startup
  2. [MISC] Execute unit-tests for different Anki versions

New release of Cross-Field Highlighter addon (v1.4.0):

  1. [FEATURE] Auto detect space-delimited languages
  2. [MISC] Add hyperlink to each row in test-case table
  3. [MISC] Execute unit-tests on Linux, macOS, and Windows
  4. [MISC] Document manual test-cases

Auto-detect if language is space-delimited. Checkbox Space-delimited language was removed:


If you’re experiencing any issues, please, post a comment in this topic.

CC @Xirai


Would it be possible to include the square brackets in this sentence?

Sentence after using the highlighter:
音[おと]で [ ] [ ]せてその 間[かん]に …

Source word:
引[ひ]き 寄[よ]せる

Example of when brackets are also highlighted:

New release of Cross-Field Highlighter addon (v1.5.0):

  1. [BUG] Fix dialog state saving when switching profile
  2. [MISC] Tested for Anki 25.02
  3. [MISC] Add test-case “Stop words: entire collocation comprises stop words”

Actually, it works already. See case #36.

I think, it highlights words separately because of spaces between symbols in the target sentence (the dots are indicating spaces):
image

1 Like

New release of Cross-Field Highlighter addon (v1.6.0):

  1. [FEATURE] Preserve dialog states during addon updating
  2. [FEATURE] Handle Em Dash (long hyphen) as a punctuation mark
  3. [BUG] Remember dialog state during changing note type
  4. [BUG] Remember dialog state when it was closed using Esc shortcut
  5. [MISC] Write logs in Unicode

New release of Cross-Field Highlighter addon (v1.6.1):

  1. [FEATURE] Upgrade for Anki 25.2.1