Skip to content

BlockSuite API Documentation / @blocksuite/blocks / ImageBlockTransformer

Class: ImageBlockTransformer

Extends

Constructors

new ImageBlockTransformer()

new ImageBlockTransformer(): ImageBlockTransformer

Returns

ImageBlockTransformer

Inherited from

BaseBlockTransformer.constructor

Properties

_internal

protected _internal: InternalPrimitives

Inherited from

BaseBlockTransformer._internal

Defined in

packages/framework/store/dist/transformer/base.d.ts:22

Methods

_propsFromSnapshot()

protected _propsFromSnapshot(propsJson): ImageBlockProps

Parameters

propsJson: Record<string, unknown>

Returns

ImageBlockProps

Inherited from

BaseBlockTransformer._propsFromSnapshot

Defined in

packages/framework/store/dist/transformer/base.d.ts:23


_propsToSnapshot()

protected _propsToSnapshot(model): object

Parameters

model: DraftModel

Returns

object

Inherited from

BaseBlockTransformer._propsToSnapshot

Defined in

packages/framework/store/dist/transformer/base.d.ts:24


fromSnapshot()

fromSnapshot(payload): Promise<SnapshotReturn<ImageBlockProps>>

Parameters

payload: FromSnapshotPayload

Returns

Promise<SnapshotReturn<ImageBlockProps>>

Overrides

BaseBlockTransformer.fromSnapshot

Defined in

packages/affine/model/dist/blocks/image/image-transformer.d.ts:5


toSnapshot()

toSnapshot(payload): Promise<object>

Parameters

payload: ToSnapshotPayload<ImageBlockProps>

Returns

Promise<object>

flavour

flavour: string

id

id: string

props

props: Record<string, unknown>

version?

optional version: number

Overrides

BaseBlockTransformer.toSnapshot

Defined in

packages/affine/model/dist/blocks/image/image-transformer.d.ts:6