# iframe

External component: embeds a third-party page or tool in an `<iframe>`. Configure the URL via the `data` field.

## Fields & Schema

| Field | Type | Required | Notes |
|-------|------|----------|-------|
| `externalComponentType` | Symbol | Yes | Must be `"iframe"` |
| `data.src` | string (in Object field) | No | The iframe `src` URL. Primary render path. |
| `html` | Text | No | Raw HTML fallback — used only if `data.src` is absent. |

The component checks `data.src` first. If present it renders `<iframe src={data.src}>`. If absent and `html` is set, it falls back to `dangerouslySetInnerHTML` from `html`.

## Usage

```bash
# Add the component
cms-edit add "iframe" --content-type externalComponent --target content

# Set the iframe URL
cms-edit set @ref data --json '{"src":"https://example.com/embed"}'

# Or set raw HTML fallback
cms-edit set @ref html '<iframe src="https://example.com/embed"></iframe>'

cms-edit save
```
