# CommandsExtension

Provides Core commands and is installed by Editor by default. Configure built-ins through Editor options.

Provides Core commands and is installed by Editor by default. Configure built-ins through Editor options.

`@quirekit/core` · **MIT**

## Editor compatibility
Layer：**Core built-in**
| Editor | Status | Assembly and boundaries |
| --- | --- | --- |
| Classic | Supported | Installed automatically by the product's Core. Manage it through Core enableCoreExtensions and coreExtensionOptions without duplicates. View-specific event behavior follows the active View. |
| Block | Supported | Installed automatically by the product's Core. Manage it through Core enableCoreExtensions and coreExtensionOptions without duplicates. View-specific event behavior follows the active 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/core@alpha
```

Editor installs this built-in by default. Use enableCoreExtensions and coreExtensionOptions instead of adding a duplicate extension.

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

Installed automatically by the product's Core. Manage it through Core enableCoreExtensions and coreExtensionOptions without duplicates. View-specific event behavior follows the active View.

### Block

Installed automatically by the product's Core. Manage it through Core enableCoreExtensions and coreExtensionOptions without duplicates. View-specific event behavior follows the active View.

## Configuration

This entry has no independent configuration fields. Set document attributes through domain commands; presets may install other configurable children.

## Commands and runtime

These commands are supplied directly by this extension. Availability depends on the installed schema, selection and protection policy; query editor.can() first.

| Command | Parameter signature |
| --- | --- |
| `extendMarkRange` | `extendMarkRange(typeOrName: QuireMarkTypeInput, attributes?: Readonly<Record<string, unknown>>)` |
| `resetAttributes` | `resetAttributes(typeOrName: QuireAttributeTypeInput, attributes: string \| readonly string[])` |
| `setMark` | `setMark(typeOrName: QuireMarkTypeInput, attrs?: Attrs \| null)` |
| `setMeta` | `setMeta(key: unknown, value: unknown)` |
| `toggleMark` | `toggleMark(typeOrName: QuireMarkTypeInput, attrs?: Attrs \| null, options?: QuireToggleMarkOptions)` |
| `unsetAllMarks` | `unsetAllMarks()` |
| `unsetMark` | `unsetMark(typeOrName: QuireMarkTypeInput, options?: QuireUnsetMarkOptions)` |
| `updateAttributes` | `updateAttributes(typeOrName: QuireAttributeTypeInput, attributes?: Readonly<Record<string, unknown>>)` |
| `updateDecorations` | `updateDecorations(extensionName?: string \| undefined)` |

These are parameter signatures. See [commands and controls](/en/build/commands) to connect UI while retaining one transaction/history authority.

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