BlockSuite API Documentation / @blocksuite/blocks / NotionHtmlAdapter
Class: NotionHtmlAdapter
Extends
Constructors
new NotionHtmlAdapter(undefined)
new NotionHtmlAdapter():
NotionHtmlAdapter
Returns
Inherited from
Properties
configs
protected
configs:Map
<string
,unknown
>
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:41
Methods
_hastToDelta()
private
_hastToDelta(ast
,option
):DeltaInsert
<object
>[]
Parameters
• ast: HtmlAST
• option= undefined
• option.pageMap?: Map
<string
, string
>
• option.trim?: boolean
Returns
DeltaInsert
<object
>[]
Source
packages/blocks/src/_common/adapters/notion-html.ts:1041
_hastToDeltaSpreaded()
private
_hastToDeltaSpreaded(ast
,option
):DeltaInsert
<object
>[]
Parameters
• ast: HtmlAST
• option= undefined
• option.pageMap?: Map
<string
, string
>
• option.trim?: boolean
Returns
DeltaInsert
<object
>[]
Source
packages/blocks/src/_common/adapters/notion-html.ts:918
_htmlToAst()
private
_htmlToAst(notionHtml
):Root
Parameters
• notionHtml: string
Returns
Root
Source
packages/blocks/src/_common/adapters/notion-html.ts:220
_traverseNotionHtml()
private
_traverseNotionHtml(html
,snapshot
,assets
?,pageMap
?):Promise
<BlockSnapshot
>
Parameters
• html: HtmlAST
• snapshot: BlockSnapshot
• assets?: AssetsManager
• pageMap?: Map
<string
, string
>
Returns
Promise
<BlockSnapshot
>
Source
packages/blocks/src/_common/adapters/notion-html.ts:224
applyConfigs()
applyConfigs(
configs
):void
Parameters
• configs: Map
<string
, unknown
>
Returns
void
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:48
fromBlockSnapshot()
fromBlockSnapshot(
_payload
):Promise
<FromBlockSnapshotResult
<string
>>
Parameters
• _payload: FromBlockSnapshotPayload
Returns
Promise
<FromBlockSnapshotResult
<string
>>
Overrides
Source
packages/blocks/src/_common/adapters/notion-html.ts:90
fromDocSnapshot()
fromDocSnapshot(
_payload
):Promise
<FromDocSnapshotResult
<string
>>
Parameters
• _payload: FromDocSnapshotPayload
Returns
Promise
<FromDocSnapshotResult
<string
>>
Overrides
Source
packages/blocks/src/_common/adapters/notion-html.ts:85
fromSliceSnapshot()
fromSliceSnapshot(
_payload
):Promise
<FromSliceSnapshotResult
<string
>>
Parameters
• _payload: FromSliceSnapshotPayload
Returns
Promise
<FromSliceSnapshotResult
<string
>>
Overrides
Source
packages/blocks/src/_common/adapters/notion-html.ts:95
toBlockSnapshot()
toBlockSnapshot(
payload
):Promise
<BlockSnapshot
>
Parameters
• payload: NotionHtmlToDocSnapshotPayload
Returns
Promise
<BlockSnapshot
>
Overrides
Source
packages/blocks/src/_common/adapters/notion-html.ts:161
toDocSnapshot()
toDocSnapshot(
payload
):Promise
<DocSnapshot
>
Parameters
• payload: NotionHtmlToDocSnapshotPayload
Returns
Promise
<DocSnapshot
>
Overrides
Source
packages/blocks/src/_common/adapters/notion-html.ts:100
toSliceSnapshot()
toSliceSnapshot(
payload
):Promise
<null
|SliceSnapshot
>
Parameters
• payload: NotionHtmlToSliceSnapshotPayload
Returns
Promise
<null
| SliceSnapshot
>
Overrides
Source
packages/blocks/src/_common/adapters/notion-html.ts:185