For AI agents: the complete documentation index is available at https://docs.flashnerd.com/llms.txt, the full documentation bundle is available at https://docs.flashnerd.com/llms-full.txt, and this page is available as Markdown at https://docs.flashnerd.com/reference/flashnerd-format/fields.md.
Skip to main content

Field definitions, values, and settings

Decks and card-template presets define ordered fields. Cards supply values keyed by those field IDs. This page documents all 11 types and every type-specific setting. See decks and cards for complete JSONL records.

The JSON examples on this page are nested fragments, expanded across lines for reading, not standalone JSONL records. Each type includes a complete definition and a complete card override; Chinese and Japanese also show their supported content-only overrides. Download the complete example package, or use the linked editable source files below. For app editing instructions, see field types. Put a field definition inside a deck's or template preset's fields array. Put its card value inside a card's values map under the definition's id. Objects and arrays stay structured JSON; do not encode them as JSON strings.

Field definition

PropertyRequiredValues and defaultExplicit null
idDeck fields: yes. Preset fields: only when referenced.Nonempty string, unique within this deck or preset. Unreferenced preset fields may omit it to generate an ID during import. Cards use deck field IDs as keys in values.Invalid
nameYesNonblank display name. Default package-validation limit: 30 UTF-16 code units after trimming; see app limits. Names must be unique within the layout after trimming and lowercasing.Invalid
sideYesfront, back, both, or note; see below.Invalid
typeYesOne of the 11 type strings below.Invalid
generalSettingsNoVisibility settings, currently only isHidden. Omission gives {"isHidden":false}.Invalid at the definition level
settingsNoSettings for this field's type, detailed below. Omission gives that type's defaults; {} also uses those defaults.Invalid at the definition level

Extra properties are ignored in definitions, values, and their nested settings. Recognized properties still follow the rules below. The default maximum is 20 fields per deck or preset. Metadata-length limits differ between standalone validation and app import; see limits. Each layout needs a front-capable field and a back-capable field; a single both field satisfies both requirements.

Preset fields with omitted IDs receive fresh app field IDs on every import, including overrides. A TTS field referencing another field requires an explicit ID on its target; names, positions, and generated source identities do not resolve references. See card-template presets for basic anonymous fields and a mixed-ID TTS example. The shared fragments below retain explicit IDs so they can also be used in decks.

sideMeaningCounts toward layout requirement
frontQuestion sideFront
backAnswer sideBack
bothBoth sidesFront and back
noteSupplemental note fieldNeither

cloze and image_occlusion must use both. The other types accept all four sides. A hidden field still participates in the layout's side check.

General settings

PropertyValuesDefault when omitted or null
isHiddenBoolean; true hides the field.false

For example, this is a field-definition fragment for a hidden note:

{"id":"field-note","name":"Private note","side":"note","type":"text","generalSettings":{"isHidden":true}}

Card value envelope

PropertyRequiredValues and defaultExplicit null
typeYesMust exactly match the owning definition's type.Invalid
valueBy typeText string or rich-text Delta array; see each type. Omission generally means empty content, except cloze requires a string.Empty for ordinary text and rich text; invalid for cloze
mediaPathNoExact media/<filename> reference for image, audio, or image_occlusion. Omitted or "" means no media.No media
clozeRangesNoCloze range array; default [].[]
occlusionRectsNoOcclusion rectangle array; default [].[]
useTemplateSettingsNoBoolean; default true.true
generalSettingsNoA card-specific isHidden setting when useTemplateSettings is false.No general override
settingsNoType-specific card settings, subject to the inheritance rules below.No settings override

A field may be omitted from values entirely to leave it empty. An explicitly present value must be an object with a matching type; "field-front":null is invalid. Use only the payload members relevant to that type. Media belongs in mediaPath, not value.

Template inheritance and card overrides

With useTemplateSettings omitted or true, the card inherits the definition's display settings. Omit generalSettings: even {} is rejected there while inheritance is enabled. Extra properties inside settings are ignored; among recognized settings, only these content-specific exceptions may be supplied:

TypeRecognized keys allowed while inheriting
chinesepinyinOverrides
japanesefuriganaOverrides, romajiOverride, pitchOverridePattern
Every other typeNo recognized keys; omit settings or use {}.

For example, this nested value supplies a pronunciation correction while preserving the template's Chinese display choices:

{"type":"chinese","value":"漢字","settings":{"pinyinOverrides":[{"tokenIndex":0,"pinyin":"hàn"}]}}

Set useTemplateSettings:false to supply the type's full settings and/or general settings for one card. Omitted properties inside an override settings object take the type's defaults below; they are not a partial merge with the template. In this mode, omitted or null settings sections import with the type/general defaults, including isHidden:false. To preserve a nondefault template option in a full override, include it explicitly.

{"type":"audio","mediaPath":"media/example.wav","useTemplateSettings":false,"generalSettings":{"isHidden":false},"settings":{"autoplay":true}}

Inside settings, optional booleans, integers, ordinary strings, and arrays accept null as their documented default. Enum settings differ: omit an enum to use its default; explicitly supplying null is invalid. Required members of a nested range or pronunciation override do not accept null.

Type index

Wire typeCard payloadDefault type settings
textString value{}
rich_textDelta array value, or empty{}
imagemediaPath{}
clozeString value plus clozeRanges{}
ttsString value, or a configured source fieldautoplay:false, sourceType:"manual", contentSourceId:"", locale:"en-US"
audiomediaPathautoplay:false
image_occlusionmediaPath plus occlusionRects{}
chineseString valuechineseType:"traditional", showPinyin:true, annotationSetting:"off", pinyinOverrides:[]
japaneseString valueshowPitchAccent:false, showFurigana:true, showRomaji:true, annotationSetting:"off", furiganaOverrides:[], romajiOverride:null, romajiType:"long_vowel", pitchOverridePattern:[]
codeString valueselectedLanguage:"python", showLineNumbers:true, wrapLines:false, forceDarkMode:false, showLanguageHeader:true, fitToContent:false, minLines:null, maxLines:null
texString valueautoSize:true

text

Plain text. value accepts a string; omission, null, and "" leave it empty. Type settings have no properties: omit settings or use {}.

Full field definition

From preset-template-ja in the full template file, field field-ja-meaning:

{
  "id": "field-ja-meaning",
  "name": "Meaning",
  "side": "back",
  "type": "text",
  "generalSettings": {
    "isHidden": false
  },
  "settings": {}
}

Full card override

From card-ticket in the full cards file, under values.field-ja-meaning:

{
  "type": "text",
  "value": "ticket",
  "useTemplateSettings": false,
  "generalSettings": {
    "isHidden": false
  },
  "settings": {}
}

Encode an embedded line break as \n inside the string, keeping the enclosing JSONL record on one physical line.

rich_text

Rich text uses a Quill Delta array, not HTML, Markdown, a serialized JSON string, or an {"ops":...} wrapper. Each array item must be an operation object containing insert. For portable text content, use string inserts. Optional attributes carry Quill formatting; for example, {"bold":true} applies bold to that insert. Finish a nonempty document with a newline insert. "", [], omission, or null represents empty content.

Type settings have no properties. The format checks that operations contain insert; it does not enumerate or validate Quill's full attribute/embed vocabulary. This format adds no custom rich-text settings. Use dedicated image/audio fields for package media.

Full field definition

From preset-template-ja in the full template file, field field-dart-notes:

{
  "id": "field-dart-notes",
  "name": "Notes",
  "side": "back",
  "type": "rich_text",
  "generalSettings": {
    "isHidden": false
  },
  "settings": {}
}

Full card override

From card-null-safety in the full cards file, under values.field-dart-notes:

{
  "type": "rich_text",
  "value": [
    {
      "insert": "Nullable",
      "attributes": {
        "bold": true
      }
    },
    {
      "insert": " types use the ? suffix.\n"
    }
  ],
  "useTemplateSettings": false,
  "generalSettings": {
    "isHidden": false
  },
  "settings": {}
}

image

Reference a packaged image with mediaPath. Type settings have no properties.

Full field definition

From preset-template-ja in the full template file, field field-ja-photo:

{
  "id": "field-ja-photo",
  "name": "Photo",
  "side": "note",
  "type": "image",
  "generalSettings": {
    "isHidden": false
  },
  "settings": {}
}

Full card override

From card-ticket in the full cards file, under values.field-ja-photo:

{
  "type": "image",
  "mediaPath": "media/station.png",
  "useTemplateSettings": false,
  "generalSettings": {
    "isHidden": true
  },
  "settings": {}
}

The path is case-sensitive and must be exactly media/<filename> at the archive root. Ordinary names, spaces, and Unicode are valid. Nested paths, backslashes, control characters, and the filenames . or .. are invalid. No asset catalog, MIME field, byte count, or hash is needed.

Omitted, null, or empty mediaPath leaves the image blank. A reference to a missing file also imports as blank while retaining the card and field; present but corrupt or oversized files still fail validation. See media for packaging details.

cloze

A cloze field must use side:"both". Its value must be a string, including "" when empty. Omission and null are invalid. clozeRanges is an array of explicit ranges; it defaults to []. Type settings have no properties.

Full field definition

From preset-template-ja in the full template file, field field-dart-cloze:

{
  "id": "field-dart-cloze",
  "name": "Cloze",
  "side": "both",
  "type": "cloze",
  "generalSettings": {
    "isHidden": false
  },
  "settings": {}
}

Full card override

From card-null-safety in the full cards file, under values.field-dart-cloze:

{
  "type": "cloze",
  "value": "Dart has null safety.",
  "clozeRanges": [
    {
      "start": 9,
      "end": 13
    }
  ],
  "useTemplateSettings": false,
  "generalSettings": {
    "isHidden": false
  },
  "settings": {}
}
Range propertyRequiredMeaning
startYesInteger, inclusive UTF-16 offset, at least 0.
endYesInteger, exclusive UTF-16 offset; start <= end <= value.length.

Ranges must be sorted by position and cannot overlap. Adjacent ranges are valid. A zero-length range is accepted, although a useful deletion normally has end > start. An emoji outside the basic multilingual plane occupies two UTF-16 code units; calculate offsets accordingly. Extra range properties are ignored; null range members remain invalid. Do not place Anki {{c1::...}} markers in place of this array.

tts

Text-to-speech reads either this field's string value or another field selected in settings. A manual value may be omitted, null, or empty. A field reference needs no manual text.

SettingValuesDefaultExplicit null
autoplayBoolean; play when shown.falseDefault
sourceTypemanual or field_referencemanualInvalid
contentSourceIdString; source field ID when using field_reference.""Default
localeSpeech locale string, for example en-US or ja-JP.en-USDefault

With field_reference, contentSourceId must refer to a text, chinese, japanese, or cloze field with an explicit id in the same deck or preset. A generated identity cannot be used as the target. A missing source, TTS source, rich-text source, or media source is rejected. The format accepts the locale as a string; it does not validate speech-engine availability.

Full field definition

From preset-template-ja in the full template file, field field-ja-speak:

{
  "id": "field-ja-speak",
  "name": "Speak",
  "side": "note",
  "type": "tts",
  "generalSettings": {
    "isHidden": false
  },
  "settings": {
    "autoplay": true,
    "sourceType": "field_reference",
    "contentSourceId": "field-ja-word",
    "locale": "ja-JP"
  }
}

Full card override

From card-ticket in the full cards file, under values.field-ja-speak:

{
  "type": "tts",
  "value": "切符",
  "useTemplateSettings": false,
  "generalSettings": {
    "isHidden": false
  },
  "settings": {
    "autoplay": true,
    "sourceType": "manual",
    "contentSourceId": "",
    "locale": "ja-JP"
  }
}

The definition reads field-ja-word, the Japanese field in this same preset. A card inheriting that definition may omit its TTS value or supply {"type":"tts"}. The full card override above switches the source to manual and supplies its own text; changing TTS settings requires useTemplateSettings:false.

audio

Reference a packaged audio file using the same path and missing-file rules as image. The full example uses the packaged media/pronunciation.wav file.

SettingValuesDefault when omitted or null
autoplayBoolean; play when shown.false

Full field definition

From preset-template-ja in the full template file, field field-ja-audio:

{
  "id": "field-ja-audio",
  "name": "Audio",
  "side": "note",
  "type": "audio",
  "generalSettings": {
    "isHidden": false
  },
  "settings": {
    "autoplay": true
  }
}

Full card override

From card-ticket in the full cards file, under values.field-ja-audio:

{
  "type": "audio",
  "mediaPath": "media/pronunciation.wav",
  "useTemplateSettings": false,
  "generalSettings": {
    "isHidden": false
  },
  "settings": {
    "autoplay": true
  }
}

Omitted, null, empty, or missing media leaves the audio value blank. Per-card autoplay changes require useTemplateSettings:false, as shown in the override example above.

image_occlusion

An image-occlusion field must use side:"both". Supply an image mediaPath and zero or more normalized occlusionRects. Type settings have no properties.

Full field definition

From preset-template-ja in the full template file, field field-ja-map:

{
  "id": "field-ja-map",
  "name": "Map",
  "side": "both",
  "type": "image_occlusion",
  "generalSettings": {
    "isHidden": false
  },
  "settings": {}
}

Full card override

From card-ticket in the full cards file, under values.field-ja-map:

{
  "type": "image_occlusion",
  "mediaPath": "media/station.png",
  "occlusionRects": [
    {
      "x": 0.1,
      "y": 0.2,
      "width": 0.3,
      "height": 0.25
    },
    {
      "x": 0.6,
      "y": 0.1,
      "width": 0.2,
      "height": 0.3
    }
  ],
  "useTemplateSettings": false,
  "generalSettings": {
    "isHidden": false
  },
  "settings": {}
}
Rectangle propertyRequiredValues
xYesFinite number: left position, 0 <= x <= 1.
yYesFinite number: top position, 0 <= y <= 1.
widthYesFinite number: 0 < width <= 1; x + width <= 1.
heightYesFinite number: 0 < height <= 1; y + height <= 1.

Coordinates are fractions of the painted image, not pixels. Rectangles need not be sorted, and overlaps are allowed. Extra rectangle properties are ignored; null coordinates remain invalid. Omitted or null occlusionRects means [].

An empty occlusion field may omit mediaPath and masks. If its image is missing at import, Flashnerd preserves the field and settings but clears the image and rectangles. This leaves a valid empty field for later export. Export rejects nonempty rectangles without an image path.

chinese

Chinese text is a string value; omitted, null, or empty means no text.

SettingValuesDefaultExplicit null
chineseTypetraditional or simplifiedtraditionalInvalid
showPinyinBooleantrueDefault
annotationSettingoff, hint, always, or backoffInvalid
pinyinOverridesArray of { "tokenIndex": integer, "pinyin": string } entries.[]Default

annotationSetting selects no annotation, a hint, always-visible annotation, or back-side annotation. Each pinyin override identifies a token by its zero-based editable-token index and supplies its replacement pronunciation. Both members are required and non-null; extra members are ignored. This index is not a UTF-16 character offset. The format parses the index as an integer and does not validate it against the text's tokenization.

Full field definition

From preset-template-ja in the full template file, field field-zh-word:

{
  "id": "field-zh-word",
  "name": "Chinese",
  "side": "front",
  "type": "chinese",
  "generalSettings": {
    "isHidden": false
  },
  "settings": {
    "chineseType": "simplified",
    "showPinyin": true,
    "annotationSetting": "hint",
    "pinyinOverrides": [
      {
        "tokenIndex": 0,
        "pinyin": "zhan4"
      }
    ]
  }
}

Inherited card value

From card-station in the full cards file, under values.field-zh-word:

{
  "type": "chinese",
  "value": "站",
  "useTemplateSettings": true,
  "settings": {
    "pinyinOverrides": [
      {
        "tokenIndex": 0,
        "pinyin": "zhan4"
      }
    ]
  }
}

Changing chineseType, showPinyin, or annotationSetting for one card requires useTemplateSettings:false. A null or omitted pinyinOverrides list means no per-card pronunciation corrections.

Full card override

From card-ticket in the full cards file, under values.field-zh-word:

{
  "type": "chinese",
  "value": "票",
  "useTemplateSettings": false,
  "generalSettings": {
    "isHidden": false
  },
  "settings": {
    "chineseType": "simplified",
    "showPinyin": true,
    "annotationSetting": "hint",
    "pinyinOverrides": [
      {
        "tokenIndex": 0,
        "pinyin": "piao4"
      }
    ]
  }
}

japanese

Japanese text is a string value; omitted, null, or empty means no text.

SettingValuesDefaultExplicit null
showPitchAccentBooleanfalseDefault
showFuriganaBooleantrueDefault
showRomajiBooleantrueDefault
annotationSettingoff, hint, always, or backoffInvalid
furiganaOverridesArray of { "sourceIndex": integer, "expectedKanji": string, "rubyOverride": string }.[]Default
romajiOverrideString containing the full-field romaji replacement.No overrideNo override
romajiTypelong_vowel or asciilong_vowelInvalid
pitchOverridePatternArray of strings; each item is exactly H, L, or "".[]Default

Annotation modes have the same choices as Chinese. Each furigana entry uses a zero-based UTF-16 sourceIndex, the kanji run expected there, and its replacement ruby text. All three members are required and non-null; extra members are ignored. The format does not check that the index/run matches the text.

romajiOverride:"" is an explicit empty string, whereas omission or null means no replacement. Pitch entries describe high, low, or unspecified pitch per mora; null entries and any other string are invalid. An empty list means no pitch override. long_vowel and ascii select the romaji notation; they are not locales.

Full field definition

From preset-template-ja in the full template file, field field-ja-word:

{
  "id": "field-ja-word",
  "name": "Word",
  "side": "front",
  "type": "japanese",
  "generalSettings": {
    "isHidden": false
  },
  "settings": {
    "showPitchAccent": true,
    "showFurigana": true,
    "showRomaji": true,
    "annotationSetting": "hint",
    "furiganaOverrides": [
      {
        "sourceIndex": 0,
        "expectedKanji": "駅",
        "rubyOverride": "えき"
      }
    ],
    "romajiOverride": "eki",
    "romajiType": "ascii",
    "pitchOverridePattern": [
      "H",
      "L"
    ]
  }
}

Inherited card value

From card-station in the full cards file, under values.field-ja-word:

{
  "type": "japanese",
  "value": "駅",
  "useTemplateSettings": true,
  "settings": {
    "furiganaOverrides": [
      {
        "sourceIndex": 0,
        "expectedKanji": "駅",
        "rubyOverride": "えき"
      }
    ],
    "romajiOverride": "eki",
    "pitchOverridePattern": [
      "H",
      "L"
    ]
  }
}

Changing the display booleans, annotationSetting, or romajiType for one card requires useTemplateSettings:false.

Full card override

From card-ticket in the full cards file, under values.field-ja-word:

{
  "type": "japanese",
  "value": "切符",
  "useTemplateSettings": false,
  "generalSettings": {
    "isHidden": false
  },
  "settings": {
    "showPitchAccent": true,
    "showFurigana": true,
    "showRomaji": true,
    "annotationSetting": "hint",
    "furiganaOverrides": [
      {
        "sourceIndex": 0,
        "expectedKanji": "切符",
        "rubyOverride": "きっぷ"
      }
    ],
    "romajiOverride": "kippu",
    "romajiType": "ascii",
    "pitchOverridePattern": [
      "L",
      "H",
      "H"
    ]
  }
}

code

Source code is a string value; omitted, null, or empty means no code. Escape line breaks as \n inside JSON.

SettingValuesDefault when omitted or null
selectedLanguageOne of the language ID strings listed below.python
showLineNumbersBooleantrue
wrapLinesBooleanfalse
forceDarkModeBoolean; use a dark syntax theme.false
showLanguageHeaderBooleantrue
fitToContentBoolean; size the code area to its contents.false
minLinesInteger or null; optional minimum visible lines.No minimum
maxLinesInteger or null; optional maximum visible lines.No maximum

Allowed language IDs: plaintext, dart, javascript, typescript, python, java, kotlin, swift, c, cpp, csharp, go, rust, ruby, php, html, css, sql, json, yaml, markdown, bash, shell. Unknown IDs, including "", are rejected. Although this is a fixed allowlist, null uses python because the property is read as an optional string.

When both line limits are present, minLines <= maxLines is required. The format imposes no separate positive minimum on either integer. Use sensible positive counts when setting visible line limits.

Full field definition

From preset-template-ja in the full template file, field field-dart-code:

{
  "id": "field-dart-code",
  "name": "Code",
  "side": "note",
  "type": "code",
  "generalSettings": {
    "isHidden": false
  },
  "settings": {
    "selectedLanguage": "dart",
    "showLineNumbers": true,
    "wrapLines": true,
    "forceDarkMode": true,
    "showLanguageHeader": true,
    "fitToContent": false,
    "minLines": 3,
    "maxLines": 12
  }
}

Full card override

From card-null-safety in the full cards file, under values.field-dart-code:

{
  "type": "code",
  "value": "String? name;",
  "useTemplateSettings": false,
  "generalSettings": {
    "isHidden": false
  },
  "settings": {
    "selectedLanguage": "dart",
    "showLineNumbers": true,
    "wrapLines": true,
    "forceDarkMode": true,
    "showLanguageHeader": true,
    "fitToContent": false,
    "minLines": 3,
    "maxLines": 12
  }
}

All per-card code settings require useTemplateSettings:false, as shown in the complete override above.

tex

Mathematical TeX source is a string value; omitted, null, or empty means no expression. Escape each TeX backslash as \\ in JSON. Type settings have one property:

SettingValuesDefault when omitted or null
autoSizeBoolean; scale math to fit the available width.true

Full field definition

From preset-template-ja in the full template file, field field-dart-formula:

{
  "id": "field-dart-formula",
  "name": "Formula",
  "side": "note",
  "type": "tex",
  "generalSettings": {
    "isHidden": true
  },
  "settings": {
    "autoSize": false
  }
}

Full card override

From card-null-safety in the full cards file, under values.field-dart-formula:

{
  "type": "tex",
  "value": "\\sum_{i=1}^{n} i = \\frac{n(n+1)}{2}",
  "useTemplateSettings": false,
  "generalSettings": {
    "isHidden": false
  },
  "settings": {
    "autoSize": false
  }
}

A per-card autoSize override requires useTemplateSettings:false. The format checks that the payload is a string; it does not parse or validate the TeX expression.

The reader additionally checks matching types, allowed override keys, TTS references, cloze ranges, and occlusion geometry. Those relationships cannot be established by validating a field fragment in isolation.