Skip to content

BlockSuite API Documentation / @blocksuite/blocks / MixTextAdapter

Class: MixTextAdapter

Extends

Constructors

new MixTextAdapter()

new MixTextAdapter(job): MixTextAdapter

Parameters

job: Job

Returns

MixTextAdapter

Overrides

BaseAdapter.constructor

Defined in

packages/blocks/src/_common/adapters/mix-text.ts:44

Properties

job

job: Job

Inherited from

BaseAdapter.job

Defined in

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

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:45

Methods

fromBlock()

fromBlock(model): Promise<undefined | FromBlockSnapshotResult<string>>

Parameters

model: DraftModel

Returns

Promise<undefined | FromBlockSnapshotResult<string>>

Inherited from

BaseAdapter.fromBlock

Defined in

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


fromBlockSnapshot()

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

Parameters

__namedParameters: FromBlockSnapshotPayload

Returns

Promise<FromBlockSnapshotResult<string>>

Overrides

BaseAdapter.fromBlockSnapshot

Defined in

packages/blocks/src/_common/adapters/mix-text.ts:90


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:49


fromDocSnapshot()

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

Parameters

__namedParameters: FromDocSnapshotPayload

Returns

Promise<FromDocSnapshotResult<string>>

Overrides

BaseAdapter.fromDocSnapshot

Defined in

packages/blocks/src/_common/adapters/mix-text.ts:100


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:51


fromSliceSnapshot()

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

Parameters

__namedParameters: FromSliceSnapshotPayload

Returns

Promise<FromSliceSnapshotResult<string>>

Overrides

BaseAdapter.fromSliceSnapshot

Defined in

packages/blocks/src/_common/adapters/mix-text.ts:119


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:53


toBlockSnapshot()

toBlockSnapshot(payload): BlockSnapshot

Parameters

payload: ToBlockSnapshotPayload<string>

Returns

BlockSnapshot

Overrides

BaseAdapter.toBlockSnapshot

Defined in

packages/blocks/src/_common/adapters/mix-text.ts:136


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:55


toDocSnapshot()

toDocSnapshot(payload): DocSnapshot

Parameters

payload: ToDocSnapshotPayload<string>

Returns

DocSnapshot

Overrides

BaseAdapter.toDocSnapshot

Defined in

packages/blocks/src/_common/adapters/mix-text.ts:171


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:57


toSliceSnapshot()

toSliceSnapshot(payload): Promise<null | SliceSnapshot>

Parameters

payload: MixTextToSliceSnapshotPayload

Returns

Promise<null | SliceSnapshot>

Overrides

BaseAdapter.toSliceSnapshot

Defined in

packages/blocks/src/_common/adapters/mix-text.ts:241