Skip to content

BlockSuite API Documentation / @blocksuite/block-std / ConfigExtension

Function: ConfigExtension()

ConfigExtension(flavor, config): ExtensionType

Create a config extension. A config extension provides a configuration object for a block flavour. The configuration object can be used like:

ts
const config = std.provider.get(ConfigIdentifier('my-flavour'));

Parameters

flavor

Flavour

The flavour of the block that the config is for.

config

Record<string, unknown>

The configuration object.

Returns

ExtensionType

Example

ts
import { ConfigExtension } from '@blocksuite/block-std';
const MyConfigExtension = ConfigExtension('my-flavour', config);

Defined in

packages/framework/block-std/src/extension/config.ts:22