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):
- [FEATURE] Add thousands separator to numbers
- [FEATURE] Handle curly (smart) quotes (
“”
)
- [BUG] Editor buttons do not work in cards mode
- [BUG] Do not show statistics from Editor
- [BUG] Adjust size of Destination layout
- [BUG] Duplicate buttons after profile switching
- [MISC] Execute unit-tests on MacOS
New release of Cross-Field Highlighter addon (v1.3.0):
- [BUG] Reading state on startup
- [MISC] Execute unit-tests for different Anki versions
New release of Cross-Field Highlighter addon (v1.4.0):
- [FEATURE] Auto detect space-delimited languages
- [MISC] Add hyperlink to each row in test-case table
- [MISC] Execute unit-tests on Linux, macOS, and Windows
- [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
Xirai
25
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):
- [BUG] Fix dialog state saving when switching profile
- [MISC] Tested for Anki 25.02
- [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):

1 Like
New release of Cross-Field Highlighter addon (v1.6.0):
- [FEATURE] Preserve dialog states during addon updating
- [FEATURE] Handle Em Dash (long hyphen) as a punctuation mark
- [BUG] Remember dialog state during changing note type
- [BUG] Remember dialog state when it was closed using Esc shortcut
- [MISC] Write logs in Unicode
New release of Cross-Field Highlighter addon (v1.6.1):
- [FEATURE] Upgrade for Anki 25.2.1