BlockSuite API Documentation / @blocksuite/blocks / NotionTextAdapter
Class: NotionTextAdapter
Extends
Constructors
new NotionTextAdapter()
new NotionTextAdapter(
job
):NotionTextAdapter
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
<string
>>
Parameters
• mode: DraftModel
Returns
Promise
<undefined
| FromBlockSnapshotResult
<string
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:46
fromBlockSnapshot()
fromBlockSnapshot():
FromBlockSnapshotResult
<string
> |Promise
<FromBlockSnapshotResult
<string
>>
Returns
FromBlockSnapshotResult
<string
> | Promise
<FromBlockSnapshotResult
<string
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/notion-text.ts:44
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:48
fromDocSnapshot()
fromDocSnapshot():
FromDocSnapshotResult
<string
> |Promise
<FromDocSnapshotResult
<string
>>
Returns
FromDocSnapshotResult
<string
> | Promise
<FromDocSnapshotResult
<string
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/notion-text.ts:53
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:50
fromSliceSnapshot()
fromSliceSnapshot():
FromSliceSnapshotResult
<string
> |Promise
<FromSliceSnapshotResult
<string
>>
Returns
FromSliceSnapshotResult
<string
> | Promise
<FromSliceSnapshotResult
<string
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/notion-text.ts:62
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:52
toBlockSnapshot()
toBlockSnapshot():
BlockSnapshot
|Promise
<BlockSnapshot
>
Returns
BlockSnapshot
| Promise
<BlockSnapshot
>
Overrides
Defined in
packages/blocks/src/_common/adapters/notion-text.ts:76
toDoc()
toDoc(
payload
):Promise
<undefined
|Doc
>
Parameters
• payload: ToDocSnapshotPayload
<string
>
Returns
Promise
<undefined
| Doc
>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:54
toDocSnapshot()
toDocSnapshot():
DocSnapshot
|Promise
<DocSnapshot
>
Returns
DocSnapshot
| Promise
<DocSnapshot
>
Overrides
Defined in
packages/blocks/src/_common/adapters/notion-text.ts:83
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:56
toSliceSnapshot()
toSliceSnapshot(
payload
):null
|SliceSnapshot
Parameters
• payload: NotionHtmlToSliceSnapshotPayload
Returns
null
| SliceSnapshot
Overrides
Defined in
packages/blocks/src/_common/adapters/notion-text.ts:90