AnkiWeb
- Rating
- 11 (π 11 Β· π 0)
- Updated
- 2023-01-21
- Anki versions
- 2.1.55~
- Description language
- en
AnkiWeb addon 1632356464
Provides a configurable cloze note type that keeps related cards and information on one note, with flexible display, iteration, scrolling, and styling options.
Open on AnkiWeb GitHub Forum topic Ask about alternatives
abandoned
| Min Anki | Max Anki | Updated |
|---|---|---|
| 2.1.48 | 2.1.55+ | 2023-01-21 |
Loadingβ¦
Provides configurable cloze note types for keeping related information on one note, with nested clozes, click-to-reveal, iteration, scrolling, and template-based options.
Reveals Anki cloze deletions progressively one at a time or with nearby context visible, adding optional images, audio, info, explanations, and customizable controls across Anki clients.
Enhances Anki cloze review with color-coded genuine and pseudo clozes, click or keyboard/touch reveal, auto-scrolling, no-cloze basic mode, and configurable shortcuts.
Provides keyboard shortcuts to add or remove [[r:: ]] randomization wrappings in Anki's editor for compatible Cloze Overlapping notetypes.
Enables easy customization and installation of AnKing note types, adding one-by-one clozes, image occlusion, auto-reveal tags, and update tracking.
Enables proper type:cloze cards with multiple cloze blanks as input fields, instant feedback, and next-character hints in Anki.
***DISCONTINUATION NOTICE: From Anki 2.1.56 Flexible cloze has been superseeded by Flexible cloze 2, no further updates will be made to this version of Flexible cloze***
Flexible cloze is an Anki addon for a configurable cloze note type for keeping related information (and cards) on the same note (Anki forum thread).
Ideas for the functionality of this cloze variant blatantly stolen from trgkanki's Cloze (Hide all) [https://ankiweb.net/shared/info/1709973686] and RisingOrange's Enhanced Cloze (for Anki 2.1) [https://ankiweb.net/shared/info/1990296174] - both of which are excellent addons. However all code written from scratch (ok, I peeked at some other code).
ALL CREDIT FOR INNOVATION GOES TO TRGANKI AND RISINGORANGE
{height=500px}
Active cloze: Cloze(s) with the current ordinal, i.e. the cloze(s) that should be answered. To change styling of these change or override "fcz-active" class in "Styling" of the card template.
Inactive cloze: Cloze(s) that are not the current ordinal, i.e. the cloze(s) that should not be answered.To change styling of these change or override "fcz-inactive" class in "Styling" of the card template.
Exposed cloze: Cloze(s) that when inactive (see above) will always be in "shown" state on the front side. Mark a cloze as exposed in the editor by making the first character an exclamation mark (e.g. {{c1::!This will be displayed on the front when the cloze ordinal is not 1}}).
--expose: # pre reverse;Scrolling: Configurable scrolling behaviour on card show/flip, when clicking a hidden cloze and when cycling to next/previous with edge taps or keyboard shortcuts:
none: no scrollmin: scrolls as little as possible to get active cloze(s) into viewcenter: centers the active clozes in the vindow.context: scroll to center (above) if this means the line following the preceding cloze will be visible, otherwise scroll to the line following the preceding cloze (i.e. show the cloze context) - this may result in the current cloze being below the screen.chapter-context: scroll to center (above) if this means the line following the preceding cloze will be visible, otherwise scroll to preceding <hr> or <h1>-<h6> or top of card (i.e. show all of the "chapter") - this may result in the current cloze being below the screen.context, center, min or none.iterate-center, iterate-min or iterate-none.click-center, click-min or click-none.--scroll: context iterate-min click-min;Iteration - cycling active, inactive or all clozes with keyboard shortcut or edge tap. Iteration behaviour can be configured as follows:
active, inactive or all.hidelooptop--iterate: active top loop hide;Non-active cloze and non-cloze field display behaviour can be configured to show per default as follows:
inactive-front, inactive-back (setting both these will make FCZ behave similar to core Anki clozes)additional-front, additional-backinfo-front, info-back--show: info-front additional-backStyling of different elements (e.g. "I want the answer to be displayed inline rather than in a block") can easily be configured in the "Styling" section of the card template.
To facilitate end user modifications of the layout, style and function of the template updates will come with a dialog allowing the user to determine which parts to update. A temporary backup (will be overwritten on next update) of the current template will be created in the add-on folder.
Changes will mainly be made inside "FCZ BEGIN/END" tags, which in turn is divided into functionality and styling allowing the user to avoid overwriting the styling part on update.
Configuration is made in the "Styling" section of the card template under the ".fcz-config" heading:
/* FLEXIBLE CLOZE CONFIGURATION======================================= */
.fcz-config {
--cloze-element: div;
--inactive-prompt: ;
--active-prompt: ;
--expose: ! begin;
--scroll: center iterate-min click-min;
--iterate: active hide loop top;
--key-next-cloze: j;
--key-previous-cloze: h;
--key-toggle-all: k;
--show: info-front additional-back info-front;
}
Clicking an active cloze on the front side will cycle it between hint (if there is one) and show.
Clicking an inactive cloze on the front side will cycle it through hide - hint - show.
When writing notes that are "sequential" in nature (i.e. when the later clozes in the note requires knowing the earlier clozes) a suggestion is to configure Anki to present new cards in order (once they are no longer new they will not come in order but that is less important):
Sequential.There is an optional "show all" button (styleable in class .fcz-show-all-btn), note that:
/* ANSWER SIDE STYLING ============================================== */
/* Show all button/bar styling (and if visible or not) */
.fcz-show-all-btn
{ display: inline; background-color: #465A65; color: white; text-align: center; text-transform: uppercase;
font-size: 15px; font-weight: bold; padding: 5px; border-bottom: 1px solid white; }
If you are updating from a previous version of the template and choose to not "overwrite all" (overwriting any personal changes you have made) you will have to manually add the actual button on the front as this requires changing the HTML outside the FCZ BEGIN/END tags. Insert <div id="fcz-show-all" class="fcz-show-all-btn" style="cursor: pointer;" onclick="fcz_toggle_all()">Show all</div> just after the closing div-tag of the <div id="fcz-additional" style="z-index: 2;"> (have a look in the add-on directory in fcz-front.html).
As there have been a few questions regarding the default styling of the template not looking like "regular Anki clozes". You can have the clozes display however you want by adjusting the CSS on the "Styling" page of the "Cards" dialog. To achieve the "regular Anki cloze styling": In the "FLEXIBLE CLOZE CONFIGURATION" section set:
--cloze-element: span;
--inactive-prompt: [...];
--active-prompt: [...];
Replace all the content under the "CLOZE STYLING" section with .fcz-active { color: blue; font-weight: bold; }. If by chance I am little off on the font-weight you can fine-tune it by starting at 400 which is normal font-weight and going upward (900 would be "very bold"). Similarly if by chance the blue nuance is off you can insert the correct RGB instead, e.g. #0000FF.
There is effectively no add-on, it's all JavaScript (and HTML/CSS) and runs 100% "client side" (the only python is the update logic). This has a number of effects:
context scrolling option.chapter-context scrolling option, scroll caused code refactor.