Skip to content

BlockSuite API Documentation / @blocksuite/blocks / AttachmentBlockTransformer

Class: AttachmentBlockTransformer

Extends

Constructors

new AttachmentBlockTransformer()

new AttachmentBlockTransformer(): AttachmentBlockTransformer

Returns

AttachmentBlockTransformer

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): AttachmentBlockProps

Parameters

propsJson

Record<string, unknown>

Returns

AttachmentBlockProps

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<SnapshotNode<AttachmentBlockProps>>

Parameters

payload

FromSnapshotPayload

Returns

Promise<SnapshotNode<AttachmentBlockProps>>

Overrides

BaseBlockTransformer.fromSnapshot

Defined in

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


toSnapshot()

toSnapshot(__namedParameters): BlockSnapshotLeaf

Parameters

__namedParameters

ToSnapshotPayload<AttachmentBlockProps>

Returns

BlockSnapshotLeaf

Inherited from

BaseBlockTransformer.toSnapshot

Defined in

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