Link Search Menu Expand Document

Activating in a range

Table of contents

  1. Activating tags in a range

Activating tags in a range

This is also known as overlapping clozes.

/** Flashcard features */
filterManager.install(
  closet.recipes.activate({ tagname: 'on', storeId: 'flashcardActive' }),
  closet.recipes.deactivate({ tagname: 'off', storeId: 'flashcardActive' }),

  closet.wrappers.product(closet.recipes.setNumber, closet.recipes.setNumber)({
    tagname: 'around',
    optionsFirst: { storeId: 'flashcardActiveTop' },
    optionsSecond: { storeId: 'flashcardActiveBottom' },
  }),

  closet.recipes.setNumber({ tagname: 'up', storeId: 'flashcardActiveTop' }),
  closet.recipes.setNumber({ tagname: 'down', storeId: 'flashcardActiveBottom' }),

  closet.recipes.activate({ tagname: 'show', storeId: 'flashcardShow' }),
  closet.recipes.activate({ tagname: 'hide', storeId: 'flashcardHide' }),

  closet.recipes.setNumber({ tagname: 'top', storeId: 'flashcardShowTop' }),
  closet.recipes.setNumber({ tagname: 'bottom', storeId: 'flashcardShowBottom' }),

  closet.wrappers.product(closet.recipes.setNumber, closet.recipes.setNumber)({
    tagname: 'ctxt',
    optionsFirst: { storeId: 'flashcardShowTop' },
    optionsSecond: { storeId: 'flashcardShowBottom' },
  }),
)

/** Default cloze */
filterManager.install(
  closet.recipes.cloze.show({ tagname: 'c' }),
  closet.recipes.cloze.hide({ tagname: 'ch' }),
  closet.recipes.cloze.reveal({ tagname: 'cr' }),
)
[[c1::Mesolimbic pathway::starts with M[[around::c*=1]]]]
[[c2::Mesocortical pathway]]
[[c3::Nigostriatal pathway::starts with N]]
[[c4::Tuberoinfundibular pathway]]
[[c5::Hypothalamospinal projection]]
[[c6::Incertohypothalamic pathway]]

It is especially popular with remembering poems.

/** Flashcard features */
filterManager.install(
  closet.recipes.activate({ tagname: 'on', storeId: 'flashcardActive' }),
  closet.recipes.deactivate({ tagname: 'off', storeId: 'flashcardActive' }),

  closet.wrappers.product(closet.recipes.setNumber, closet.recipes.setNumber)({
    tagname: 'around',
    optionsFirst: { storeId: 'flashcardActiveTop' },
    optionsSecond: { storeId: 'flashcardActiveBottom' },
  }),

  closet.recipes.setNumber({ tagname: 'up', storeId: 'flashcardActiveTop' }),
  closet.recipes.setNumber({ tagname: 'down', storeId: 'flashcardActiveBottom' }),

  closet.recipes.activate({ tagname: 'show', storeId: 'flashcardShow' }),
  closet.recipes.activate({ tagname: 'hide', storeId: 'flashcardHide' }),

  closet.recipes.setNumber({ tagname: 'top', storeId: 'flashcardShowTop' }),
  closet.recipes.setNumber({ tagname: 'bottom', storeId: 'flashcardShowBottom' }),

  closet.wrappers.product(closet.recipes.setNumber, closet.recipes.setNumber)({
    tagname: 'ctxt',
    optionsFirst: { storeId: 'flashcardShowTop' },
    optionsSecond: { storeId: 'flashcardShowBottom' },
  }),
)

/** Default cloze */
filterManager.install(
  closet.recipes.cloze.show({ tagname: 'c' }),
  closet.recipes.cloze.hide({ tagname: 'ch' }),
  closet.recipes.cloze.reveal({ tagname: 'cr' }),
)
[[c1::Mesolimbic pathway::starts with M[[up::c1=1,c2=1,c3=1]][[down::c4=1,c5=1,c6=1]]]]
[[c2::Mesocortical pathway]]
[[c3::Nigostriatal pathway::starts with N]]
[[c4::Tuberoinfundibular pathway]]
[[c5::Hypothalamospinal projection]]
[[c6::Incertohypothalamic pathway]]