BlockSuite API Documentation / @blocksuite/blocks / ImageAdapter
Class: ImageAdapter
Extends
Constructors
new ImageAdapter()
new ImageAdapter(
job
):ImageAdapter
Parameters
• job: Job
Returns
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:46
Properties
configs
protected
configs:Map
<string
,unknown
>
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:44
job
job:
Job
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:45
Methods
applyConfigs()
applyConfigs(
configs
):void
Parameters
• configs: Map
<string
, unknown
>
Returns
void
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:59
fromBlock()
fromBlock(
mode
):Promise
<FromBlockSnapshotResult
<Image
>>
Parameters
• mode: DraftModel
Returns
Promise
<FromBlockSnapshotResult
<Image
>>
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:55
fromBlockSnapshot()
fromBlockSnapshot(
_payload
):Promise
<FromBlockSnapshotResult
<Image
>>
Parameters
• _payload: FromBlockSnapshotPayload
Returns
Promise
<FromBlockSnapshotResult
<Image
>>
Overrides
Source
packages/blocks/src/_common/adapters/image.ts:38
fromDoc()
fromDoc(
doc
):Promise
<FromDocSnapshotResult
<Image
>>
Parameters
• doc: Doc
Returns
Promise
<FromDocSnapshotResult
<Image
>>
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:53
fromDocSnapshot()
fromDocSnapshot(
_payload
):Promise
<FromDocSnapshotResult
<Image
>>
Parameters
• _payload: FromDocSnapshotPayload
Returns
Promise
<FromDocSnapshotResult
<Image
>>
Overrides
Source
packages/blocks/src/_common/adapters/image.ts:32
fromSlice()
fromSlice(
slice
):Promise
<FromSliceSnapshotResult
<Image
>>
Parameters
• slice: Slice
Returns
Promise
<FromSliceSnapshotResult
<Image
>>
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:57
fromSliceSnapshot()
fromSliceSnapshot(
payload
):Promise
<FromSliceSnapshotResult
<Image
>>
Parameters
• payload: FromSliceSnapshotPayload
Returns
Promise
<FromSliceSnapshotResult
<Image
>>
Overrides
Source
packages/blocks/src/_common/adapters/image.ts:44
toBlock()
toBlock(
payload
,doc
,parent
?,index
?):Promise
<BlockModel
<object
>>
Parameters
• payload: ToBlockSnapshotPayload
<Image
>
• doc: Doc
• parent?: string
• index?: number
Returns
Promise
<BlockModel
<object
>>
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:56
toBlockSnapshot()
toBlockSnapshot(
_payload
):Promise
<BlockSnapshot
>
Parameters
• _payload: ToBlockSnapshotPayload
<Image
>
Returns
Promise
<BlockSnapshot
>
Overrides
Source
packages/blocks/src/_common/adapters/image.ts:71
toDoc()
toDoc(
payload
):Promise
<Doc
>
Parameters
• payload: ToDocSnapshotPayload
<Image
>
Returns
Promise
<Doc
>
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:54
toDocSnapshot()
toDocSnapshot(
_payload
):Promise
<DocSnapshot
>
Parameters
• _payload: ToDocSnapshotPayload
<Image
>
Returns
Promise
<DocSnapshot
>
Overrides
Source
packages/blocks/src/_common/adapters/image.ts:65
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
Source
packages/framework/store/dist/adapter/base.d.ts:58
toSliceSnapshot()
toSliceSnapshot(
payload
):Promise
<null
|SliceSnapshot
>
Parameters
• payload: ImageToSliceSnapshotPayload
Returns
Promise
<null
| SliceSnapshot
>
Overrides
Source
packages/blocks/src/_common/adapters/image.ts:77