BlockSuite API Documentation / @blocksuite/blocks / HtmlAdapter
Class: HtmlAdapter
Contents
Extends
Constructors
new HtmlAdapter(undefined)
new HtmlAdapter():
HtmlAdapter
Returns
Inherited from
@blocksuite/store.BaseAdapter.constructor
Properties
_notion
private
_notion:NotionHtmlAdapter
Source
packages/blocks/src/_common/adapters/html.ts:50
configs
protected
configs:Map
<string
,unknown
>
Inherited from
@blocksuite/store.BaseAdapter.configs
Source
packages/store/dist/adapter/base.d.ts:41
Methods
_astToHtml()
private
_astToHtml(ast
):string
Parameters
• ast: Root
Returns
string
Source
packages/blocks/src/_common/adapters/html.ts:133
_deltaToHast()
private
_deltaToHast(deltas
): (Text
|Element
)[]
Parameters
• deltas: DeltaInsert
[]
Returns
(Text
| Element
)[]
Source
packages/blocks/src/_common/adapters/html.ts:598
_deltaToHigglightHasts()
private
_deltaToHigglightHasts(deltas
,rawLang
):Promise
<ElementContent
[]>
Parameters
• deltas: DeltaInsert
[]
• rawLang: unknown
Returns
Promise
<ElementContent
[]>
Source
packages/blocks/src/_common/adapters/html.ts:544
_traverseSnapshot()
private
_traverseSnapshot(snapshot
,html
,assets
?):Promise
<Object
>
Parameters
• snapshot: BlockSnapshot
• html: HtmlAST
• assets?: AssetsManager
Returns
Promise
<Object
>
assetsIds
assetsIds:
string
[]ast
ast:
Root
Source
packages/blocks/src/_common/adapters/html.ts:137
applyConfigs()
applyConfigs(
configs
):void
Parameters
• configs: Map
<string
, string
>
Returns
void
Overrides
@blocksuite/store.BaseAdapter.applyConfigs
Source
packages/blocks/src/_common/adapters/html.ts:52
fromBlockSnapshot()
fromBlockSnapshot(
payload
):Promise
<FromBlockSnapshotResult
<string
>>
Parameters
• payload: FromBlockSnapshotPayload
Returns
Promise
<FromBlockSnapshotResult
<string
>>
Overrides
@blocksuite/store.BaseAdapter.fromBlockSnapshot
Source
packages/blocks/src/_common/adapters/html.ts:72
fromPageSnapshot()
fromPageSnapshot(
payload
):Promise
<FromPageSnapshotResult
<string
>>
Parameters
• payload: FromPageSnapshotPayload
Returns
Promise
<FromPageSnapshotResult
<string
>>
Overrides
@blocksuite/store.BaseAdapter.fromPageSnapshot
Source
packages/blocks/src/_common/adapters/html.ts:57
fromSliceSnapshot()
fromSliceSnapshot(
payload
):Promise
<FromSliceSnapshotResult
<string
>>
Parameters
• payload: FromSliceSnapshotPayload
Returns
Promise
<FromSliceSnapshotResult
<string
>>
Overrides
@blocksuite/store.BaseAdapter.fromSliceSnapshot
Source
packages/blocks/src/_common/adapters/html.ts:93
toBlockSnapshot()
toBlockSnapshot(
_payload
):Promise
<BlockSnapshot
>
Parameters
• _payload: ToBlockSnapshotPayload
<string
>
Returns
Promise
<BlockSnapshot
>
Overrides
@blocksuite/store.BaseAdapter.toBlockSnapshot
Source
packages/blocks/src/_common/adapters/html.ts:122
toPageSnapshot()
toPageSnapshot(
_payload
):Promise
<PageSnapshot
>
Parameters
• _payload: ToPageSnapshotPayload
<string
>
Returns
Promise
<PageSnapshot
>
Overrides
@blocksuite/store.BaseAdapter.toPageSnapshot
Source
packages/blocks/src/_common/adapters/html.ts:117
toSliceSnapshot()
toSliceSnapshot(
_payload
):Promise
<SliceSnapshot
>
Parameters
• _payload: HtmlToSliceSnapshotPayload
Returns
Promise
<SliceSnapshot
>
Overrides
@blocksuite/store.BaseAdapter.toSliceSnapshot
Source
packages/blocks/src/_common/adapters/html.ts:127
Generated using typedoc-plugin-markdown and TypeDoc