Creates fresh conventional Basic, reversed, and Cloze definitions for callers that need direct control. More...
Static Public Member Functions | |
| static AnkiNoteType | CreateBasic () |
| Creates a conventional Basic definition that generates one front-to-back card. | |
| static AnkiNoteType | CreateBasicAndReversed () |
| Creates a conventional Basic (and reversed) definition that generates two study directions. | |
| static AnkiNoteType | CreateCloze () |
Creates a conventional Cloze definition with Text and Extra fields. | |
Creates fresh conventional Basic, reversed, and Cloze definitions for callers that need direct control.
These factories mirror familiar Anki note types while avoiding a dependency on definitions installed in a user's profile. Every call returns a different, initially mutable AnkiNoteType with a new ID. Configure its CSS or add fields before creating the first note, then reuse that same instance for every note with the same schema.
For ordinary deck creation, prefer AnkiDeck.AddBasicNote, AnkiDeck.AddBasicAndReversedNote, or AnkiDeck.AddClozeNote. Those helpers reuse one matching definition across the complete deck hierarchy. Repeatedly calling these factories yourself without reusing the result can create several note types with the same visible name but different IDs.
Definition at line 30 of file AnkiNoteTypes.cs.
|
inlinestatic |
Creates a conventional Basic definition that generates one front-to-back card.
Front and Back fields and one card template.The front renders {{Front}}. The answer reuses {{FrontSide}}, adds Anki's conventional answer rule, then renders {{Back}}. Field values may contain HTML and media references and are not sanitized.
Definition at line 54 of file AnkiNoteTypes.cs.
|
inlinestatic |
Creates a conventional Basic (and reversed) definition that generates two study directions.
Front and Back fields and two reciprocal templates.Every note always generates both directions, front-to-back first and back-to-front second. This is different from Anki's optional-reverse pattern, which conditionally creates a reverse card based on an extra field; create a custom Standard note type when conditional reversal is required.
Definition at line 67 of file AnkiNoteTypes.cs.
|
inlinestatic |
Creates a conventional Cloze definition with Text and Extra fields.
Text and Extra fields and one cloze template.The front and back use {{cloze:Text}}; the answer additionally renders Extra. Cards are generated from distinct positive cloze indexes in Text, not from template count. Use AnkiCloze.Wrap to build simple deletions or supply valid advanced Anki markup yourself through the low-level note API.
Definition at line 80 of file AnkiNoteTypes.cs.