Skip to content

BlockSuite API Documentation / @blocksuite/affine-model / createEmbedBlockSchema

Function: createEmbedBlockSchema()

createEmbedBlockSchema<Props, Model, Transformer>(__namedParameters): object

Type Parameters

Props extends object

Model extends EmbedBlockModel<Props>

Transformer extends BaseBlockTransformer<EmbedProps<Props>> = BaseBlockTransformer<EmbedProps<Props>>

Parameters

__namedParameters

name

string

props

(internalPrimitives) => Props

toModel

() => Model

transformer

() => Transformer

version

number

Returns

object

model

model: object & object

Type declaration

flavour

flavour: `affine:embed-${string}`

props

props: PropsGetter<EmbedProps<Props>>

Type declaration

role

role: "content" = 'content'

version

version: number

transformer()?

optional transformer: () => Transformer

Returns

Transformer

version

version: number

Defined in

packages/affine/model/src/utils/helper.ts:25