Memrise card template [support thread]

A little update for the addon to support field alternatives.

  1. Now formatted alternatives (marked by part="alt") are properly displayed in the editor with a dedicated style (multiple alternatives can be put together with | used for separation – each will be considered a valid answer when the field is tested on):

  2. There are two new tools in the editor for working with alternatives’ formatting without manually editing field’s html code:

    • The first one reformats the currently selected part of a field into an alternative answer:

      1-1

      If there is no selection in the active field, using this tool creates a placeholder for an alternative to be typed into:

      1-2


    • The second tool cleans all alternative answer formatting from the active field (contents of the alternative answer section are preserved and merged back into the main part):

      2


    There are also keyboard shortcuts for both tools: Alt+A and Alt+X respectively

  3. The alternatives are now discarded when the “Fill choices” function is used to generate lists of potential answers for multiple-choice cards


Note, that Memrise’s hidden alternatives functionality can be reproduced by adding the off class to an alternative section:

A hidden alternative will be displayed in the editor normally while being automatically hidden during reviews. Alternatives from this section will still be accepted as valid answers when the field is tested on. One potential use is accounting for variations in spellings of a word. A field can have both, a normal alternative section and hidden alternatives.

(This feature does not have a UI button but can be implemented if requested)