# Resource Editor

Edit JSON and YAML fields, lists, and source before saving a draft.

## Open a resource

Open an entry from a resource Collection. JSON and YAML files use the Resource Editor. Choose Visual to edit supported data as fields and lists, or Code to edit the complete source.

## Edit fields and lists

Text, numbers, booleans, and null values have corresponding controls. Expand objects to edit their fields and arrays to edit their items. You can add or remove fields and items, and use the list controls to move items up or down.

Supported Collection schema fields supply types, labels, required markers, and validation messages. Missing optional fields remain absent until you choose **Set field**. Required fields cannot be removed. Keep each value consistent with its declared type.

## Example resource

```yaml
title: Getting started
featured: true
links:
  - label: Installation
    href: /docs/install/
  - label: Configuration
    href: /docs/configuration/
```

In Visual, `title` is a text field, `featured` is a boolean, and `links` is a list of objects. In Code, you edit the YAML directly. JSON uses the same editing workflow.

## When Code is needed

Invalid syntax, unsupported values, and very large or deeply nested structures can prevent Visual mode from opening. Use Code to edit those files. Syntax errors and validation problems must be resolved before saving.

## Media and dates

Supported image, audio, and video fields open a media picker. Nested objects and media lists can expose these controls too; declared media field types take precedence over inferred shapes. An empty media list stays empty until you choose a file. Check source paths, dimensions, captions, and alt text after inserting or replacing media.

Date fields accept dates and supported ISO timestamps. The text field shows the complete source value, including any timezone offset. Use the adjacent calendar button for a picker; simply opening a field does not convert its timezone.

## What the schema covers

Prosefly reads supported static schema definitions or infers fields from content samples. It does not execute imported schema factories, transformations, or all nested validation rules. The website’s own validation and build remain necessary.

Switching between Visual and Code does not save or publish. Mode switching preserves the source until edits are made; editing YAML may normalize some formatting. Resource files are limited to 250 kB of UTF-8 source.

Resource strings do not automatically bring unpublished [Public images](/docs/public-files/) into review. Publish those images first, then review the resource that references them.

## Save and publish

Click **Save draft** after editing. Resource changes do not save automatically and are not written to Git until you publish. Save the latest changes before opening publication review.

If another update has changed the saved resource, download your local copy if needed and load the latest version before continuing. Resource editing does not provide the live cursor collaboration of the document editor.
