Configures one named input field in an AnkiNoteType. More...
Properties | |
| string | Name = Name [get] |
| Gets the exact field name used by note values and template references. | |
| bool | IsRightToLeft = IsRightToLeft [get] |
| Gets whether compatible Anki editors should use right-to-left input for this field. | |
| bool | IsSticky = IsSticky [get] |
| Gets whether compatible Anki editors may retain this field's value for the next manually entered note. | |
| string | Font = Font [get] |
| Gets the note-editor font-family preference, not the rendered card font. | |
| int | FontSize = FontSize [get] |
| Gets the note-editor font-size preference in pixels, not the rendered card size. | |
Configures one named input field in an AnkiNoteType.
| Name | The field name used as the exact key in AnkiNote.Fields and in template expressions such as {{German}}. Names must be non-blank and unique within a note type without regard to case. |
| IsRightToLeft | true to request right-to-left input in compatible Anki editors. This is an editor hint; it does not add direction: rtl to card CSS. |
| IsSticky | true to ask compatible Anki editors to carry the previous value into the next new note. This does not copy values when notes are created through AnkiIO. |
| Font | The non-blank font-family preference for Anki's note editor. It does not select the font on rendered study cards. |
| FontSize | The positive editor font size in pixels. It does not change the card's rendered font size. |
Field order is significant: Anki package formats store note values positionally, and AnkiNoteType.Fields defines that order. Add configured fields before creating the first note, because the note type freezes on first use.
Font, FontSize, IsRightToLeft, and IsSticky describe the note editor only. Put presentation rules in AnkiNoteType.Css or the card template. Constructing this immutable record does not validate its arguments; AnkiNoteType.AddConfiguredField validates them when the field is attached, which allows ordinary with expressions while keeping invalid definitions out of a note type.
Definition at line 39 of file AnkiField.cs.
|
get |
Gets the note-editor font-family preference, not the rendered card font.
The font name supplied to the primary constructor, or Arial by default.
Definition at line 60 of file AnkiField.cs.
|
get |
Gets the note-editor font-size preference in pixels, not the rendered card size.
The size supplied to the primary constructor, or 20 by default.
Definition at line 64 of file AnkiField.cs.
|
get |
Gets whether compatible Anki editors should use right-to-left input for this field.
true when right-to-left editor input is requested; otherwise, false.
Definition at line 52 of file AnkiField.cs.
|
get |
Gets whether compatible Anki editors may retain this field's value for the next manually entered note.
true when the field is sticky; otherwise, false.
Definition at line 56 of file AnkiField.cs.
|
get |
Gets the exact field name used by note values and template references.
The name supplied to the primary constructor; validated when added to a note type.
Definition at line 48 of file AnkiField.cs.