> 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.

# 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](https://docs.flashnerd.com/reference/flashnerd-format/decks.md) and [cards](https://docs.flashnerd.com/reference/flashnerd-format/cards.md) 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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/comprehensive.flashnerd" download>complete example package</a>, or use the linked editable source files below. For app editing instructions, see [field types](https://docs.flashnerd.com/reference/fields/index.md). 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

| Property          | Required                                               | Values and default                                                                                                                                                                                                                                              | Explicit `null`                 |
| ----------------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
| `id`              | Deck 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                         |
| `name`            | Yes                                                    | Nonblank display name. Default package-validation limit: 30 UTF-16 code units after trimming; see [app limits](https://docs.flashnerd.com/reference/flashnerd-format/package.md#limits). Names must be unique within the layout after trimming and lowercasing. | Invalid                         |
| `side`            | Yes                                                    | `front`, `back`, `both`, or `note`; see below.                                                                                                                                                                                                                  | Invalid                         |
| `type`            | Yes                                                    | One of the 11 type strings below.                                                                                                                                                                                                                               | Invalid                         |
| `generalSettings` | No                                                     | Visibility settings, currently only `isHidden`. Omission gives `{"isHidden":false}`.                                                                                                                                                                            | Invalid at the definition level |
| `settings`        | No                                                     | Settings 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](https://docs.flashnerd.com/reference/flashnerd-format/package.md#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](https://docs.flashnerd.com/reference/flashnerd-format/presets.md#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.

| `side`  | Meaning                 | Counts toward layout requirement |
| ------- | ----------------------- | -------------------------------- |
| `front` | Question side           | Front                            |
| `back`  | Answer side             | Back                             |
| `both`  | Both sides              | Front and back                   |
| `note`  | Supplemental note field | Neither                          |

`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

| Property   | Values                           | Default when omitted or `null` |
| ---------- | -------------------------------- | ------------------------------ |
| `isHidden` | Boolean; `true` hides the field. | `false`                        |

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

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

## Card value envelope

| Property              | Required | Values and default                                                                                                           | Explicit `null`                                          |
| --------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| `type`                | Yes      | Must exactly match the owning definition's `type`.                                                                           | Invalid                                                  |
| `value`               | By type  | Text 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 |
| `mediaPath`           | No       | Exact `media/<filename>` reference for `image`, `audio`, or `image_occlusion`. Omitted or `""` means no media.               | No media                                                 |
| `clozeRanges`         | No       | Cloze range array; default `[]`.                                                                                             | `[]`                                                     |
| `occlusionRects`      | No       | Occlusion rectangle array; default `[]`.                                                                                     | `[]`                                                     |
| `useTemplateSettings` | No       | Boolean; default `true`.                                                                                                     | `true`                                                   |
| `generalSettings`     | No       | A card-specific `isHidden` setting when `useTemplateSettings` is `false`.                                                    | No general override                                      |
| `settings`            | No       | Type-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:

| Type             | Recognized keys allowed while inheriting                      |
| ---------------- | ------------------------------------------------------------- |
| `chinese`        | `pinyinOverrides`                                             |
| `japanese`       | `furiganaOverrides`, `romajiOverride`, `pitchOverridePattern` |
| Every other type | No recognized keys; omit `settings` or use `{}`.              |

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

```json
{"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.

```json
{"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 type                             | Card payload                                 | Default type settings                                                                                                                                                                           |
| ------------------------------------- | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`text`](#text)                       | String `value`                               | `{}`                                                                                                                                                                                            |
| [`rich_text`](#rich_text)             | Delta array `value`, or empty                | `{}`                                                                                                                                                                                            |
| [`image`](#image)                     | `mediaPath`                                  | `{}`                                                                                                                                                                                            |
| [`cloze`](#cloze)                     | String `value` plus `clozeRanges`            | `{}`                                                                                                                                                                                            |
| [`tts`](#tts)                         | String `value`, or a configured source field | `autoplay:false`, `sourceType:"manual"`, `contentSourceId:""`, `locale:"en-US"`                                                                                                                 |
| [`audio`](#audio)                     | `mediaPath`                                  | `autoplay:false`                                                                                                                                                                                |
| [`image_occlusion`](#image_occlusion) | `mediaPath` plus `occlusionRects`            | `{}`                                                                                                                                                                                            |
| [`chinese`](#chinese)                 | String `value`                               | `chineseType:"traditional"`, `showPinyin:true`, `annotationSetting:"off"`, `pinyinOverrides:[]`                                                                                                 |
| [`japanese`](#japanese)               | String `value`                               | `showPitchAccent:false`, `showFurigana:true`, `showRomaji:true`, `annotationSetting:"off"`, `furiganaOverrides:[]`, `romajiOverride:null`, `romajiType:"long_vowel"`, `pitchOverridePattern:[]` |
| [`code`](#code)                       | String `value`                               | `selectedLanguage:"python"`, `showLineNumbers:true`, `wrapLines:false`, `forceDarkMode:false`, `showLanguageHeader:true`, `fitToContent:false`, `minLines:null`, `maxLines:null`                |
| [`tex`](#tex)                         | String `value`                               | `autoSize: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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/preferences/card_template_presets/00000.jsonl" download>the full template file</a>, field `field-ja-meaning`:

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

### Full card override

From `card-ticket` in <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/content/cards/00000.jsonl" download>the full cards file</a>, under `values.field-ja-meaning`:

```json
{
  "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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/preferences/card_template_presets/00000.jsonl" download>the full template file</a>, field `field-dart-notes`:

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

### Full card override

From `card-null-safety` in <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/content/cards/00000.jsonl" download>the full cards file</a>, under `values.field-dart-notes`:

```json
{
  "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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/preferences/card_template_presets/00000.jsonl" download>the full template file</a>, field `field-ja-photo`:

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

### Full card override

From `card-ticket` in <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/content/cards/00000.jsonl" download>the full cards file</a>, under `values.field-ja-photo`:

```json
{
  "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](https://docs.flashnerd.com/reference/flashnerd-format/media.md) 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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/preferences/card_template_presets/00000.jsonl" download>the full template file</a>, field `field-dart-cloze`:

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

### Full card override

From `card-null-safety` in <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/content/cards/00000.jsonl" download>the full cards file</a>, under `values.field-dart-cloze`:

```json
{
  "type": "cloze",
  "value": "Dart has null safety.",
  "clozeRanges": [
    {
      "start": 9,
      "end": 13
    }
  ],
  "useTemplateSettings": false,
  "generalSettings": {
    "isHidden": false
  },
  "settings": {}
}
```

| Range property | Required | Meaning                                                           |
| -------------- | -------- | ----------------------------------------------------------------- |
| `start`        | Yes      | Integer, inclusive UTF-16 offset, at least `0`.                   |
| `end`          | Yes      | Integer, 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.

| Setting           | Values                                                | Default  | Explicit `null` |
| ----------------- | ----------------------------------------------------- | -------- | --------------- |
| `autoplay`        | Boolean; play when shown.                             | `false`  | Default         |
| `sourceType`      | `manual` or `field_reference`                         | `manual` | Invalid         |
| `contentSourceId` | String; source field ID when using `field_reference`. | `""`     | Default         |
| `locale`          | Speech locale string, for example `en-US` or `ja-JP`. | `en-US`  | Default         |

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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/preferences/card_template_presets/00000.jsonl" download>the full template file</a>, field `field-ja-speak`:

```json
{
  "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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/content/cards/00000.jsonl" download>the full cards file</a>, under `values.field-ja-speak`:

```json
{
  "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](#image). The full example uses the packaged `media/pronunciation.wav` file.

| Setting    | Values                    | Default when omitted or `null` |
| ---------- | ------------------------- | ------------------------------ |
| `autoplay` | Boolean; play when shown. | `false`                        |

### Full field definition

From `preset-template-ja` in <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/preferences/card_template_presets/00000.jsonl" download>the full template file</a>, field `field-ja-audio`:

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

### Full card override

From `card-ticket` in <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/content/cards/00000.jsonl" download>the full cards file</a>, under `values.field-ja-audio`:

```json
{
  "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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/preferences/card_template_presets/00000.jsonl" download>the full template file</a>, field `field-ja-map`:

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

### Full card override

From `card-ticket` in <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/content/cards/00000.jsonl" download>the full cards file</a>, under `values.field-ja-map`:

```json
{
  "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 property | Required | Values                                               |
| ------------------ | -------- | ---------------------------------------------------- |
| `x`                | Yes      | Finite number: left position, `0 <= x <= 1`.         |
| `y`                | Yes      | Finite number: top position, `0 <= y <= 1`.          |
| `width`            | Yes      | Finite number: `0 < width <= 1`; `x + width <= 1`.   |
| `height`           | Yes      | Finite 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.

| Setting             | Values                                                          | Default       | Explicit `null` |
| ------------------- | --------------------------------------------------------------- | ------------- | --------------- |
| `chineseType`       | `traditional` or `simplified`                                   | `traditional` | Invalid         |
| `showPinyin`        | Boolean                                                         | `true`        | Default         |
| `annotationSetting` | `off`, `hint`, `always`, or `back`                              | `off`         | Invalid         |
| `pinyinOverrides`   | Array 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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/preferences/card_template_presets/00000.jsonl" download>the full template file</a>, field `field-zh-word`:

```json
{
  "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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/content/cards/00000.jsonl" download>the full cards file</a>, under `values.field-zh-word`:

```json
{
  "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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/content/cards/00000.jsonl" download>the full cards file</a>, under `values.field-zh-word`:

```json
{
  "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.

| Setting                | Values                                                                                  | Default      | Explicit `null` |
| ---------------------- | --------------------------------------------------------------------------------------- | ------------ | --------------- |
| `showPitchAccent`      | Boolean                                                                                 | `false`      | Default         |
| `showFurigana`         | Boolean                                                                                 | `true`       | Default         |
| `showRomaji`           | Boolean                                                                                 | `true`       | Default         |
| `annotationSetting`    | `off`, `hint`, `always`, or `back`                                                      | `off`        | Invalid         |
| `furiganaOverrides`    | Array of `{ "sourceIndex": integer, "expectedKanji": string, "rubyOverride": string }`. | `[]`         | Default         |
| `romajiOverride`       | String containing the full-field romaji replacement.                                    | No override  | No override     |
| `romajiType`           | `long_vowel` or `ascii`                                                                 | `long_vowel` | Invalid         |
| `pitchOverridePattern` | Array 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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/preferences/card_template_presets/00000.jsonl" download>the full template file</a>, field `field-ja-word`:

```json
{
  "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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/content/cards/00000.jsonl" download>the full cards file</a>, under `values.field-ja-word`:

```json
{
  "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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/content/cards/00000.jsonl" download>the full cards file</a>, under `values.field-ja-word`:

```json
{
  "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.

| Setting              | Values                                           | Default when omitted or `null` |
| -------------------- | ------------------------------------------------ | ------------------------------ |
| `selectedLanguage`   | One of the language ID strings listed below.     | `python`                       |
| `showLineNumbers`    | Boolean                                          | `true`                         |
| `wrapLines`          | Boolean                                          | `false`                        |
| `forceDarkMode`      | Boolean; use a dark syntax theme.                | `false`                        |
| `showLanguageHeader` | Boolean                                          | `true`                         |
| `fitToContent`       | Boolean; size the code area to its contents.     | `false`                        |
| `minLines`           | Integer or null; optional minimum visible lines. | No minimum                     |
| `maxLines`           | Integer 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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/preferences/card_template_presets/00000.jsonl" download>the full template file</a>, field `field-dart-code`:

```json
{
  "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 <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/content/cards/00000.jsonl" download>the full cards file</a>, under `values.field-dart-code`:

```json
{
  "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:

| Setting    | Values                                          | Default when omitted or `null` |
| ---------- | ----------------------------------------------- | ------------------------------ |
| `autoSize` | Boolean; scale math to fit the available width. | `true`                         |

### Full field definition

From `preset-template-ja` in <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/preferences/card_template_presets/00000.jsonl" download>the full template file</a>, field `field-dart-formula`:

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

### Full card override

From `card-null-safety` in <a href="https://docs.flashnerd.com/examples/flashnerd-format/full/content/cards/00000.jsonl" download>the full cards file</a>, under `values.field-dart-formula`:

```json
{
  "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.

## Schemas and related references

- <a href="https://docs.flashnerd.com/examples/flashnerd-format/schemas/field_definition.schema.json" download>Field definition schema</a>
- <a href="https://docs.flashnerd.com/examples/flashnerd-format/schemas/field_value.schema.json" download>Card field value schema</a>
- <a href="https://docs.flashnerd.com/examples/flashnerd-format/schemas/general_settings.schema.json" download>General settings schema</a>
- <a href="https://docs.flashnerd.com/examples/flashnerd-format/schemas/field_settings.schema.json" download>Type settings schema</a>

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.
