# htmlViewExtension

Registers the retained html view with browser flow layout and View-owned input/selection. It is distinct from native dom mode.

Registers the retained html view with browser flow layout and View-owned input/selection. It is distinct from native dom mode.

`@quirekit/view-html` · **AGPL-3.0-only**

## Editor compatibility
Layer：**View integration**
| Editor | Status | Assembly and boundaries |
| --- | --- | --- |
| Classic | Unsupported | This View is outside the product's current mounting contract. Independent Core hosts can select it through the View guide; adding the extension does not switch product form. |
| Block | Supported | [createBlockEditorPreset](/en/plugins/reference/create-block-editor-preset) — createBlockEditor registers retained HTML View automatically; configure it through view. createBlockEditorPreset alone does not register a View. |

“Supported” means the product assembly above exists; interaction, host services and file formats retain their own conditions. See [status and integration rules](/en/plugins/compatibility). Licensing is shown separately.

## Installation

```sh
pnpm add @quirekit/view-html@alpha
```

Install in Editor extensions. The host supplies a view, container and persistence; see [Quick start](/en/guide/quick-start).

```ts
import { htmlViewExtension } from '@quirekit/view-html'
```

Use compatible versions available from your distribution source. This site uses the Alpha workspace. License labels come from package metadata; see [support and licensing](/en/support).

## Integration by editor

These snippets use an existing host element named element. The host owns container sizing and persistence; call instance.destroy() on teardown. Avoid duplicating preset capabilities and supply required host ports before installation.

### Classic

This View is outside the product's current mounting contract. Independent Core hosts can select it through the View guide; adding the extension does not switch product form.

### Block

createBlockEditor registers retained HTML View automatically; configure it through view. createBlockEditorPreset alone does not register a View.

[createBlockEditorPreset](/en/plugins/reference/create-block-editor-preset)

```ts
import { createBlockEditor } from '@quirekit/block-editor'
import '@quirekit/block-editor/styles.css'

const instance = createBlockEditor({
  element,
  content: { type: 'doc', content: [{ type: 'paragraph' }] },
})
```

## Configuration

These are extension-level defaults. Presets can override them; they are distinct from current document attributes. See [configuration](/en/plugins/configuration).

### runtime

Runtime options applied when the editor mounts HTML mode.

Type：`HtmlMountedViewRuntimeOptions | undefined`

Default：`undefined`

## Commands and runtime

This entry declares no directly enumerable commands. Children supply bundle commands; product plugins use contributions or document services.

## Next steps

Return to [all plugins](/en/plugins), or read [configuration](/en/plugins/configuration) to distinguish options, attributes and commands.

See [extension development](/en/build/extension) for custom capabilities and [Build a product](/en/build) for complete hosting.
