Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizing the Back template breaks formatting of the current cloze #35

Open
JoanEliot opened this issue Jan 14, 2025 · 0 comments
Open

Comments

@JoanEliot
Copy link

Per the Instructions page (INSTRUCTIONS.md)

"...for the Back Template you could alternatively make a copy of the Front Template, rather than referencing it through {{FrontSide}}, and then customize the Back Template to be totally different."

However, when you do that, the current cloze loses the special formatting that you are supposed to see.

The deletion characters substituted for the current cloze on the front, and the corresponding 'revealed' current cloze text on the back, are supposed to be bold and blue, by default anyway, on both sides of the card. This special formatting makes the cloze characters stand out from the rest of the text in the field. You can even change the formatting per side according to the instructions in issue #7 .

This works fine if you use the simplest Back template, like so:

<div id="back">
{{FrontSide}}
</div>

However, if you use a custom Back template instead distinct formatting is lost. This is so even in the sample deck, even using the example custom Back template given on the Instructions page:

{{#ExpressionCloze}}
{{#ExpressionCloze1}}
<div id="back">
<script defer src="_cloze_anything_x.y.js"></script>

<div id="cloze" data-card="{{Card}}">
{{ExpressionCloze}}
</div>

{{Meaning}}
</div>
{{/ExpressionCloze1}}
{{/ExpressionCloze}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant