# createBlockEditorPreset

Returns the Block content extension array for independent Core or custom products. It does not mount HTML View; unset children use preset defaults and false disables them.

Returns the Block content extension array for independent Core or custom products. It does not mount HTML View; unset children use preset defaults and false disables them.

`@quirekit/block-editor` · **AGPL-3.0-only**

## Editor compatibility
Layer：**Block product integration**
| Editor | Status | Assembly and boundaries |
| --- | --- | --- |
| Classic | Unsupported | This entry targets continuous-flow Block, not the paginated Classic product. Use the corresponding shared or Word capability with Classic assembly. |
| Block | Supported | createBlockEditor accepts a preset options object or false and calls this function internally. Independent Core hosts spread its returned extensions and register their own 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/block-editor@alpha
```

This exports or returns an extension array. Spread its elements into Core extensions; do not nest the array as one extension or treat it as a Classic product preset.

```ts
import { createBlockEditorPreset } from '@quirekit/block-editor'

const extensions = createBlockEditorPreset({ characterCount: { limit: 5000 } })
```

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 entry targets continuous-flow Block, not the paginated Classic product. Use the corresponding shared or Word capability with Classic assembly.

### Block

createBlockEditor accepts a preset options object or false and calls this function internally. Independent Core hosts spread its returned extensions and register their own View.

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

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

## Configuration

Pass these fields to the factory options. Required ports come from the host. undefined means no explicit option; documented factory fallbacks apply.

### richContent

Columns, reusable recipes, web cards and portable media; optional host storage and metadata.

Type：`false | Partial<BlockRichContentOptions>`

Default：`{}`

See [BlockRichContent](/en/plugins/reference/block-rich-content) for child settings. Only pass false when this field's type permits it.

### bodyContent

Footnotes, definition lists, dates and Unicode emoji authoring.

Type：`false`

Default：`undefined`

### math

Inline and standalone formulas with shared visual authoring.

Type：`false`

Default：`undefined`

### paragraphFormat

Paragraph alignment, indentation and spacing from the open Word paragraph model.

Type：`false`

Default：`undefined`

### containers

Editable highlighter, named callout and disclosure containers.

Type：`false`

Default：`undefined`

### image

Persistent image blocks with shared display controls.

Type：`false`

Default：`undefined`

### search

Transient find/replace; false omits search controls and commands.

Type：`false | Partial<SearchExtensionOptions>`

Default：`undefined`

See [Search](/en/plugins/reference/search) for child settings. Only pass false when this field's type permits it.

### formatting

Character formatting clipboard and clearing; false omits the feature.

Type：`false | Partial<FormattingOptions>`

Default：`undefined`

See [Formatting](/en/plugins/reference/formatting) for child settings. Only pass false when this field's type permits it.

### blockInteraction

Stable structural block actions; false omits the block menu.

Type：`false | Partial<BlockInteractionOptions>`

Default：`undefined`

See [BlockInteraction](/en/plugins/reference/block-interaction) for child settings. Only pass false when this field's type permits it.

### dataView

Portable table and board objects; false omits the feature.

Type：`false | Partial<DataViewOptions>`

Default：`undefined`

See [DataView](/en/plugins/reference/data-view) for child settings. Only pass false when this field's type permits it.

### textDiagram

Shared local Mermaid, PlantUML and DOT source authoring; false omits the feature.

Type：`false | Partial<TextDiagramOptions>`

Default：`undefined`

See [TextDiagram](/en/plugins/reference/text-diagram) for child settings. Only pass false when this field's type permits it.

### mindMap

Editable mind map objects; false explicitly omits the feature.

Type：`false | Partial<MindMapOptions>`

Default：`undefined`

See [MindMap](/en/plugins/reference/mind-map) for child settings. Only pass false when this field's type permits it.

### flowchart

Editable flowchart objects; false explicitly omits the feature.

Type：`false | Partial<FlowchartOptions>`

Default：`undefined`

See [Flowchart](/en/plugins/reference/flowchart) for child settings. Only pass false when this field's type permits it.

### whiteboard

Source-backed whiteboard blocks; false explicitly omits the feature.

Type：`false | Partial<WhiteboardOptions>`

Default：`undefined`

See [Whiteboard](/en/plugins/reference/whiteboard) for child settings. Only pass false when this field's type permits it.

### starterKit

StarterKit configuration, or false when supplying a replacement schema.

Type：`false | Partial<StarterKitOptions>`

Default：`undefined`

See [StarterKit](/en/plugins/reference/starter-kit) for child settings. Only pass false when this field's type permits it.

### textStyle

Existing text-style commands and marks, or false to omit the bundle.

Type：`false | Partial<TextStyleKitOptions>`

Default：`undefined`

See [TextStyleKit](/en/plugins/reference/text-style-kit) for child settings. Only pass false when this field's type permits it.

### link

Link semantics and recognition, or false to omit the mark.

Type：`false | Partial<LinkOptions>`

Default：`undefined`

See [Link](/en/plugins/reference/link) for child settings. Only pass false when this field's type permits it.

### characterCount

On-demand statistics; limits are disabled unless explicitly configured.

Type：`false | Partial<CharacterCountOptions>`

Default：`undefined`

See [CharacterCount](/en/plugins/reference/character-count) for child settings. Only pass false when this field's type permits it.

## Commands and runtime

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

This returns content extensions rather than a ClassicEditorPreset object. Unset children use the preset's assembly and options override selected children. Media, authoring workspaces and the full Block product retain their own mounting/persistence contracts.

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