Repeto Documentation
Browse documentation

Note types and templates

Define reusable fields and card blueprints, including conditional fields and cloze deletions.

A note type defines an ordered field list and one or more card templates. The type belongs to your collection, so it can be used by notes in different decks. It is not a deck-specific setting.

Repeto seeds its purpose-built Translation, Concept, Q&A, and Cloze types plus the familiar Basic families: Basic (and reversed card), Basic (optional reversed card), and Basic (type in the answer). It also includes a complete first-party Image Occlusion workflow. You can create, duplicate, preview, and edit custom types from Settings → Note types.

Manage note types

Settings → Note types opens the collection-wide manager. It labels built-in and custom types, shows each type’s field and template count, and lets you create a type, edit its definition, duplicate it, or copy its fields, templates, and CSS as Markdown. Built-in types cannot be deleted. An unused custom type can be deleted after confirmation; if any notes still use it, Repeto keeps the type and explains that those notes must be converted or deleted first.

The full-page editor keeps field and card-template order explicit. For standard and Cloze types, you can add, rename, reorder, or remove fields and templates, edit each template’s front and back, and edit the shared CSS. The front and back render in isolated live previews using sample field values. Image Occlusion keeps its required field order and template list fixed in this manager, while its front, back, and CSS remain available for review and editing; create and edit masks from the specialized deck editor.

Adding a field or template at the end is safe. Renaming, reordering, or removing an existing field or template changes positional identity, so the editor shows a structural warning and the server blocks an unsafe mutation while notes still use that type. Use an explicit note conversion instead of forcing the definition change.

Front and back templates

Each card template has a front and a back. Insert a field by wrapping its name in double braces:

<!-- Front -->
{{Term}}

<!-- Back -->
{{FrontSide}}<hr>{{Translation}}

{{FrontSide}} places the rendered front on the back. Plain HTML around replacements appears on every card created from the template.

Repeto currently supports this practical template syntax:

  • {{Field}} for field replacement, using a case-insensitive field lookup;
  • {{FrontSide}} on the back;
  • {{#Field}}…{{/Field}} when a field is non-empty;
  • {{^Field}}…{{/Field}} when a field is empty;
  • {{text:Field}} to strip HTML;
  • {{cloze:Field}} for cloze rendering;
  • {{Tags}}, {{Deck}}, {{Type}}, and {{Card}} for metadata.

Unknown filters currently fall back to the underlying field value. Preview every imported or custom template instead of assuming a desktop-only filter behaves identically.

Optional content

Conditional sections keep empty labels off the card:

{{#Example}}
  <p class="example">{{Example}}</p>
{{/Example}}

Use an inverted section for a fallback:

{{^Example}}
  <p>No example yet.</p>
{{/Example}}

Multiple templates and reverse cards

Add another template when one note should generate another review direction. The note type, not a one-off duplicate note, should define that relationship. Template order becomes the card ordinal used to identify sibling cards.

The built-in reversed type creates two sibling cards from one shared note. The optional reversed type creates its second sibling only when Add Reverse is non-empty. Turning that field off and on preserves the sibling’s identity and scheduling instead of creating an unrelated note.

Repeto can also generate reverse practice for supported deck profiles, but a reusable multi-template note type is the stronger foundation when both directions are part of the subject model.

Type the answer

Place {{type:Field}} on the front to ask for a typed response. The reviewer focuses an accessible single-line input, reveals the correct value, and shows a character-level comparison and match percentage. {{type:nc:Field}} compares without diacritics, and typed cloze targets the active deletion.

Typed answers help you compare recall; they do not choose Again, Hard, Good, or Easy for you. You still rate the card after inspecting the difference.

Cloze deletions

A cloze note hides selected text inside a larger statement:

The hippocampus is important for {{c1::episodic memory}}.

Use c1, c2, and later numbers to create separate cloze cards from one note. Repeto reconciles cloze card ordinals when a cloze field changes, so adding or removing a deletion updates the generated sibling set.

Styling and safety

Each note type can include CSS. Repeto renders template HTML inside an isolated preview/reviewer surface and sanitizes it before insertion. Keep styling focused on the card: typography, spacing, colors, and media sizing. Do not rely on scripts or application-global selectors.

As you edit, Repeto runs the server template checker and shows each finding with its severity, source, position, and suggested repair. It checks template structure, unknown and reserved fields, blank or duplicate fronts, cloze requirements, unsupported filters, and dangerous HTML/CSS. Errors block Save. Warnings stay visible but do not block a deliberate save. If the current definition has not finished checking, or diagnostics are unavailable, saving pauses instead of allowing an unchecked definition through.

After editing a note type, preview representative notes with empty optional fields, long text, images, and both light and dark themes. Imported templates should also be reviewed with preserve template colors both on and off.

Change existing notes to another type

Open Card browser, switch to Notes mode, and select notes that share one current note type. Choose Change note type to open the full-page conversion flow. Only standard-to-standard conversion is supported.

For each target field, choose the source field to copy. Then map each existing sibling card to at most one target template, or mark that sibling for removal. At least one field and one existing card must be mapped. Mapped cards keep their card ID, deck, schedule, and review history; new target siblings start with a new schedule.

Choose Preview changes before converting. The preview reports preserved schedules, new and removed siblings, unmapped non-empty values, and empty card fronts. Changing a mapping makes that preview stale. Commit sends the preview fingerprint and requires separate exact confirmations for discarded non-empty values, empty fronts, and the precise sibling card IDs that will be retired. If a selected note changes after preview, the stale fingerprint prevents the conversion.

Cloze and Image Occlusion derive card identity from their content. They are rejected as conversion sources and targets until specialized conversion semantics exist. The manager does not provide arbitrary field migrations inside an in-use type, automatic empty-card cleanup, or stable cross-client field/template IDs yet.

Image Occlusion

In a deck, start a new card, choose Image Occlusion, then open the full-page editor. Upload a PNG, JPEG, GIF, WebP, or AVIF image and draw rectangle, ellipse, or polygon masks. SVG and other active media are rejected even if their filename looks like a supported image.

Each mask group becomes one sibling card. A group can contain several shapes, and the editor can combine selected groups, split a multi-shape group into separate cards, reorder groups, and remove a group with an explicit confirmation. Existing groups keep durable identities, so editing masks preserves the matching card’s schedule; retired card history remains preserved.

Choose Hide all, guess one to cover every group on the question and reveal only the current group on the answer. Choose Hide one, guess one to cover only the current group. The editor includes question/answer preview, optional header and back-extra text, private comments, and tags. Pointer and touch drawing are supported; the selected shape can also be moved with the arrow keys, resized with Shift+Arrow for rectangles and ellipses, or deleted with Delete.

The reviewer uses the specialized image-and-mask surface rather than the generic template fallback. It identifies the current group, reveals the target outline and optional back-extra text with the answer, and still uses the ordinary Again, Hard, Good, and Easy scheduling flow.

Current limits are 512 mask groups per note, 64 shapes per group, and 256 points per polygon. Freehand masks, automatic label detection, and safe conversion to or from ordinary/Cloze note types are not supported.