BlockSuite API Documentation / @blocksuite/blocks / ImageAdapter
Class: ImageAdapter
Extends
Constructors
new ImageAdapter()
new ImageAdapter(
job
):ImageAdapter
Parameters
• job: Job
Returns
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:45
Properties
job
job:
Job
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:43
Accessors
configs
get
configs():Map
<string
,string
>
Returns
Map
<string
, string
>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:44
Methods
fromBlock()
fromBlock(
mode
):Promise
<undefined
|FromBlockSnapshotResult
<Image
>>
Parameters
• mode: DraftModel
Returns
Promise
<undefined
| FromBlockSnapshotResult
<Image
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:46
fromBlockSnapshot()
fromBlockSnapshot(
_payload
):Promise
<FromBlockSnapshotResult
<Image
>>
Parameters
• _payload: FromBlockSnapshotPayload
Returns
Promise
<FromBlockSnapshotResult
<Image
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/image.ts:33
fromDoc()
fromDoc(
doc
):Promise
<undefined
|FromDocSnapshotResult
<Image
>>
Parameters
• doc: Doc
Returns
Promise
<undefined
| FromDocSnapshotResult
<Image
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:48
fromDocSnapshot()
fromDocSnapshot(
_payload
):Promise
<FromDocSnapshotResult
<Image
>>
Parameters
• _payload: FromDocSnapshotPayload
Returns
Promise
<FromDocSnapshotResult
<Image
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/image.ts:42
fromSlice()
fromSlice(
slice
):Promise
<undefined
|FromSliceSnapshotResult
<Image
>>
Parameters
• slice: Slice
Returns
Promise
<undefined
| FromSliceSnapshotResult
<Image
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:50
fromSliceSnapshot()
fromSliceSnapshot(
payload
):Promise
<FromSliceSnapshotResult
<Image
>>
Parameters
• payload: FromSliceSnapshotPayload
Returns
Promise
<FromSliceSnapshotResult
<Image
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/image.ts:51
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
Defined in
packages/framework/store/dist/adapter/base.d.ts:52
toBlockSnapshot()
toBlockSnapshot(
_payload
):Promise
<BlockSnapshot
>
Parameters
• _payload: ToBlockSnapshotPayload
<Image
>
Returns
Promise
<BlockSnapshot
>
Overrides
Defined in
packages/blocks/src/_common/adapters/image.ts:72
toDoc()
toDoc(
payload
):Promise
<undefined
|Doc
>
Parameters
• payload: ToDocSnapshotPayload
<Image
>
Returns
Promise
<undefined
| Doc
>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:54
toDocSnapshot()
toDocSnapshot(
_payload
):Promise
<DocSnapshot
>
Parameters
• _payload: ToDocSnapshotPayload
<Image
>
Returns
Promise
<DocSnapshot
>
Overrides
Defined in
packages/blocks/src/_common/adapters/image.ts:81
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
Defined in
packages/framework/store/dist/adapter/base.d.ts:56
toSliceSnapshot()
toSliceSnapshot(
payload
):Promise
<null
|SliceSnapshot
>
Parameters
• payload: ImageToSliceSnapshotPayload
Returns
Promise
<null
| SliceSnapshot
>
Overrides
Defined in
packages/blocks/src/_common/adapters/image.ts:90