BlockSuite API Documentation / @blocksuite/blocks / NotionHtmlAdapter
Class: NotionHtmlAdapter
Extends
Constructors
new NotionHtmlAdapter()
new NotionHtmlAdapter(
job
):NotionHtmlAdapter
Parameters
• job: Job
Returns
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:46
Properties
job
job:
Job
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:44
Accessors
configs
get
configs():Map
<string
,string
>
Returns
Map
<string
, string
>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:45
Methods
fromBlock()
fromBlock(
model
):Promise
<undefined
|FromBlockSnapshotResult
<string
>>
Parameters
• model: DraftModel
Returns
Promise
<undefined
| FromBlockSnapshotResult
<string
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:47
fromBlockSnapshot()
fromBlockSnapshot(
_payload
):Promise
<FromBlockSnapshotResult
<string
>>
Parameters
• _payload: FromBlockSnapshotPayload
Returns
Promise
<FromBlockSnapshotResult
<string
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/notion-html.ts:1163
fromDoc()
fromDoc(
doc
):Promise
<undefined
|FromDocSnapshotResult
<string
>>
Parameters
• doc: Doc
Returns
Promise
<undefined
| FromDocSnapshotResult
<string
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:49
fromDocSnapshot()
fromDocSnapshot(
_payload
):Promise
<FromDocSnapshotResult
<string
>>
Parameters
• _payload: FromDocSnapshotPayload
Returns
Promise
<FromDocSnapshotResult
<string
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/notion-html.ts:1172
fromSlice()
fromSlice(
slice
):Promise
<undefined
|FromSliceSnapshotResult
<string
>>
Parameters
• slice: Slice
Returns
Promise
<undefined
| FromSliceSnapshotResult
<string
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:51
fromSliceSnapshot()
fromSliceSnapshot(
_payload
):Promise
<FromSliceSnapshotResult
<string
>>
Parameters
• _payload: FromSliceSnapshotPayload
Returns
Promise
<FromSliceSnapshotResult
<string
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/notion-html.ts:1181
toBlock()
toBlock(
payload
,doc
,parent
?,index
?):Promise
<undefined
|BlockModel
<object
,object
>>
Parameters
• payload: ToBlockSnapshotPayload
<string
>
• doc: Doc
• parent?: string
• index?: number
Returns
Promise
<undefined
| BlockModel
<object
, object
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:53
toBlockSnapshot()
toBlockSnapshot(
payload
):Promise
<BlockSnapshot
>
Parameters
• payload: NotionHtmlToDocSnapshotPayload
Returns
Promise
<BlockSnapshot
>
Overrides
Defined in
packages/blocks/src/_common/adapters/notion-html.ts:1190
toDoc()
toDoc(
payload
):Promise
<undefined
|Doc
>
Parameters
• payload: NotionHtmlToDocSnapshotPayload
Returns
Promise
<undefined
| Doc
>
Overrides
Defined in
packages/blocks/src/_common/adapters/notion-html.ts:1215
toDocSnapshot()
toDocSnapshot(
payload
):Promise
<DocSnapshot
>
Parameters
• payload: NotionHtmlToDocSnapshotPayload
Returns
Promise
<DocSnapshot
>
Overrides
Defined in
packages/blocks/src/_common/adapters/notion-html.ts:1220
toSlice()
toSlice(
payload
,doc
,parent
?,index
?):Promise
<undefined
|Slice
>
Parameters
• payload: ToSliceSnapshotPayload
<string
>
• doc: Doc
• parent?: string
• index?: number
Returns
Promise
<undefined
| Slice
>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:57
toSliceSnapshot()
toSliceSnapshot(
payload
):Promise
<null
|SliceSnapshot
>
Parameters
• payload: NotionHtmlToSliceSnapshotPayload
Returns
Promise
<null
| SliceSnapshot
>
Overrides
Defined in
packages/blocks/src/_common/adapters/notion-html.ts:1282