Skip to content

BlockSuite API Documentation / @blocksuite/blocks / HtmlAdapter

Class: HtmlAdapter

Extends

Constructors

new HtmlAdapter()

new HtmlAdapter(job): HtmlAdapter

Parameters

job: Job

Returns

HtmlAdapter

Inherited from

BaseAdapter.constructor

Defined in

packages/framework/store/dist/adapter/base.d.ts:45

Properties

job

job: Job

Inherited from

BaseAdapter.job

Defined in

packages/framework/store/dist/adapter/base.d.ts:43

Accessors

configs

get configs(): Map<string, string>

Returns

Map<string, string>

Inherited from

BaseAdapter.configs

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

BaseAdapter.fromBlock

Defined in

packages/framework/store/dist/adapter/base.d.ts:46


fromBlockSnapshot()

fromBlockSnapshot(payload): Promise<FromBlockSnapshotResult<string>>

Parameters

payload: FromBlockSnapshotPayload

Returns

Promise<FromBlockSnapshotResult<string>>

Overrides

BaseAdapter.fromBlockSnapshot

Defined in

packages/blocks/src/_common/adapters/html.ts:1120


fromDoc()

fromDoc(doc): Promise<undefined | FromDocSnapshotResult<string>>

Parameters

doc: Doc

Returns

Promise<undefined | FromDocSnapshotResult<string>>

Inherited from

BaseAdapter.fromDoc

Defined in

packages/framework/store/dist/adapter/base.d.ts:48


fromDocSnapshot()

fromDocSnapshot(payload): Promise<FromDocSnapshotResult<string>>

Parameters

payload: FromDocSnapshotPayload

Returns

Promise<FromDocSnapshotResult<string>>

Overrides

BaseAdapter.fromDocSnapshot

Defined in

packages/blocks/src/_common/adapters/html.ts:1142


fromSlice()

fromSlice(slice): Promise<undefined | FromSliceSnapshotResult<string>>

Parameters

slice: Slice

Returns

Promise<undefined | FromSliceSnapshotResult<string>>

Inherited from

BaseAdapter.fromSlice

Defined in

packages/framework/store/dist/adapter/base.d.ts:50


fromSliceSnapshot()

fromSliceSnapshot(payload): Promise<FromSliceSnapshotResult<string>>

Parameters

payload: FromSliceSnapshotPayload

Returns

Promise<FromSliceSnapshotResult<string>>

Overrides

BaseAdapter.fromSliceSnapshot

Defined in

packages/blocks/src/_common/adapters/html.ts:1158


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

BaseAdapter.toBlock

Defined in

packages/framework/store/dist/adapter/base.d.ts:52


toBlockSnapshot()

toBlockSnapshot(payload): Promise<BlockSnapshot>

Parameters

payload: ToBlockSnapshotPayload<string>

Returns

Promise<BlockSnapshot>

Overrides

BaseAdapter.toBlockSnapshot

Defined in

packages/blocks/src/_common/adapters/html.ts:1183


toDoc()

toDoc(payload): Promise<undefined | Doc>

Parameters

payload: ToDocSnapshotPayload<string>

Returns

Promise<undefined | Doc>

Inherited from

BaseAdapter.toDoc

Defined in

packages/framework/store/dist/adapter/base.d.ts:54


toDocSnapshot()

toDocSnapshot(payload): Promise<DocSnapshot>

Parameters

payload: ToDocSnapshotPayload<string>

Returns

Promise<DocSnapshot>

Overrides

BaseAdapter.toDocSnapshot

Defined in

packages/blocks/src/_common/adapters/html.ts:1207


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

BaseAdapter.toSlice

Defined in

packages/framework/store/dist/adapter/base.d.ts:56


toSliceSnapshot()

toSliceSnapshot(payload): Promise<null | SliceSnapshot>

Parameters

payload: HtmlToSliceSnapshotPayload

Returns

Promise<null | SliceSnapshot>

Overrides

BaseAdapter.toSliceSnapshot

Defined in

packages/blocks/src/_common/adapters/html.ts:1268