Skip to content

BlockSuite API Documentation / @blocksuite/blocks / ImageAdapter

Class: ImageAdapter

Extends

Constructors

new ImageAdapter()

new ImageAdapter(job): ImageAdapter

Parameters

job

Job

Returns

ImageAdapter

Inherited from

BaseAdapter.constructor

Defined in

packages/framework/store/dist/adapter/base.d.ts:46

Properties

job

job: Job

Inherited from

BaseAdapter.job

Defined in

packages/framework/store/dist/adapter/base.d.ts:44

Accessors

configs

Get Signature

get configs(): Map<string, string>

Returns

Map<string, string>

Inherited from

BaseAdapter.configs

Defined in

packages/framework/store/dist/adapter/base.d.ts:45

Methods

fromBlock()

fromBlock(model): Promise<undefined | FromBlockSnapshotResult<Image>>

Parameters

model

DraftModel

Returns

Promise<undefined | FromBlockSnapshotResult<Image>>

Inherited from

BaseAdapter.fromBlock

Defined in

packages/framework/store/dist/adapter/base.d.ts:47


fromBlockSnapshot()

fromBlockSnapshot(_payload): Promise<FromBlockSnapshotResult<Image>>

Parameters

_payload

FromBlockSnapshotPayload

Returns

Promise<FromBlockSnapshotResult<Image>>

Overrides

BaseAdapter.fromBlockSnapshot

Defined in

packages/blocks/src/_common/adapters/image.ts:36


fromDoc()

fromDoc(doc): Promise<undefined | FromDocSnapshotResult<Image>>

Parameters

doc

Doc

Returns

Promise<undefined | FromDocSnapshotResult<Image>>

Inherited from

BaseAdapter.fromDoc

Defined in

packages/framework/store/dist/adapter/base.d.ts:49


fromDocSnapshot()

fromDocSnapshot(_payload): Promise<FromDocSnapshotResult<Image>>

Parameters

_payload

FromDocSnapshotPayload

Returns

Promise<FromDocSnapshotResult<Image>>

Overrides

BaseAdapter.fromDocSnapshot

Defined in

packages/blocks/src/_common/adapters/image.ts:45


fromSlice()

fromSlice(slice): Promise<undefined | FromSliceSnapshotResult<Image>>

Parameters

slice

Slice

Returns

Promise<undefined | FromSliceSnapshotResult<Image>>

Inherited from

BaseAdapter.fromSlice

Defined in

packages/framework/store/dist/adapter/base.d.ts:51


fromSliceSnapshot()

fromSliceSnapshot(payload): Promise<FromSliceSnapshotResult<Image>>

Parameters

payload

FromSliceSnapshotPayload

Returns

Promise<FromSliceSnapshotResult<Image>>

Overrides

BaseAdapter.fromSliceSnapshot

Defined in

packages/blocks/src/_common/adapters/image.ts:54


toBlock()

toBlock(payload, doc, parent?, index?): Promise<undefined | BlockModel<object, object>>

Parameters

payload

ToBlockSnapshotPayload<Image>

doc

Doc

parent?

string

index?

number

Returns

Promise<undefined | BlockModel<object, object>>

Inherited from

BaseAdapter.toBlock

Defined in

packages/framework/store/dist/adapter/base.d.ts:53


toBlockSnapshot()

toBlockSnapshot(_payload): Promise<BlockSnapshot>

Parameters

_payload

ToBlockSnapshotPayload<Image>

Returns

Promise<BlockSnapshot>

Overrides

BaseAdapter.toBlockSnapshot

Defined in

packages/blocks/src/_common/adapters/image.ts:75


toDoc()

toDoc(payload): Promise<undefined | Doc>

Parameters

payload

ToDocSnapshotPayload<Image>

Returns

Promise<undefined | Doc>

Inherited from

BaseAdapter.toDoc

Defined in

packages/framework/store/dist/adapter/base.d.ts:55


toDocSnapshot()

toDocSnapshot(_payload): Promise<DocSnapshot>

Parameters

_payload

ToDocSnapshotPayload<Image>

Returns

Promise<DocSnapshot>

Overrides

BaseAdapter.toDocSnapshot

Defined in

packages/blocks/src/_common/adapters/image.ts:84


toSlice()

toSlice(payload, doc, parent?, index?): Promise<undefined | Slice>

Parameters

payload

ToSliceSnapshotPayload<Image>

doc

Doc

parent?

string

index?

number

Returns

Promise<undefined | Slice>

Inherited from

BaseAdapter.toSlice

Defined in

packages/framework/store/dist/adapter/base.d.ts:57


toSliceSnapshot()

toSliceSnapshot(payload): Promise<null | SliceSnapshot>

Parameters

payload

ImageToSliceSnapshotPayload

Returns

Promise<null | SliceSnapshot>

Overrides

BaseAdapter.toSliceSnapshot

Defined in

packages/blocks/src/_common/adapters/image.ts:93