context: i add ::}} at the end, so it omits the “revealing information” with [ ]. And [ ] signals, that it is actually not part of the requested solution.
reason: the different cards are siblings (I want to learn them one by one) and it saves time to create them like this.
problem: when I use the “::}} / [ ]”-trick, the text in the the ::}} part is shown in the answer color as well. So I have a lot of “red” and it can confuse me on the answer side, what the actual question was.
is it somehow possible to omit “revealing informations” with a special cloze-deletion egs. with {{c1x::revealing information}} so that it doesnt show on the question side and/or that it shows on the answer side in normal color?
You have a “if” condition with the “.endsWith(‘::}}’)”.
The problem about this is, that there will be no such thing registered by your JavaScript. When the cloze loads in, the opening tag “{{c1::” and closing tag “::sometext}}” get erased and transformed into an HTML-Element.
If you want to exactly see what I mean, just look at one of your flashcards in the preview or reviewer, press right click and open the inspect menu.
There you can see, how the clozes are build in the HTML-Page.
The “cloze-inactive” is indeed a predefined class. But it is only used in the reviewer / preview page. When you change the color of “.cloze-inactive”. You only change the color of the clozes, which are not being reviewed at the moment.
Example:
If you are reviewing cloze 1 and set the color of “cloze-inactive” to red, cloze 1 will stay blue, but cloze 2 will be painted as red.
You get into the inspector mode by just pressing right click on the reviewer / preview page and pressing the “inspect” option.
In the screenshot above, I am using an add-on named AnkiWebView Inspector, which I have published on the AnkiWeb. If you install this add-on and right-click and choose the command Inspect, the inspector panel will appear.
However, you can also debug Anki’s webviews from Chormium-based browsers such as Google Chrome or Microsoft Edge without my add-on by setting an environment variable. See Debugging - Writing Anki Add-ons .