BlockSuite API Documentation / @blocksuite/blocks / MixTextAdapter
Class: MixTextAdapter
Extends
Constructors
new MixTextAdapter()
new MixTextAdapter(
job
):MixTextAdapter
Parameters
• job: Job
Returns
Overrides
Source
packages/blocks/src/_common/adapters/mix-text.ts:40
Properties
_markdownAdapter
private
_markdownAdapter:MarkdownAdapter
Source
packages/blocks/src/_common/adapters/mix-text.ts:38
configs
protected
configs:Map
<string
,unknown
>
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:44
job
job:
Job
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:45
Methods
_traverseSnapshot()
private
_traverseSnapshot(snapshot
):Promise
<object
>
Parameters
• snapshot: BlockSnapshot
Returns
Promise
<object
>
mixtext
mixtext:
string
Source
packages/blocks/src/_common/adapters/mix-text.ts:45
applyConfigs()
applyConfigs(
configs
):void
Parameters
• configs: Map
<string
, unknown
>
Returns
void
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:59
fromBlock()
fromBlock(
mode
):Promise
<FromBlockSnapshotResult
<string
>>
Parameters
• mode: DraftModel
Returns
Promise
<FromBlockSnapshotResult
<string
>>
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:55
fromBlockSnapshot()
fromBlockSnapshot(
__namedParameters
):Promise
<FromBlockSnapshotResult
<string
>>
Parameters
• __namedParameters: FromBlockSnapshotPayload
Returns
Promise
<FromBlockSnapshotResult
<string
>>
Overrides
Source
packages/blocks/src/_common/adapters/mix-text.ts:105
fromDoc()
fromDoc(
doc
):Promise
<FromDocSnapshotResult
<string
>>
Parameters
• doc: Doc
Returns
Promise
<FromDocSnapshotResult
<string
>>
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:53
fromDocSnapshot()
fromDocSnapshot(
__namedParameters
):Promise
<FromDocSnapshotResult
<string
>>
Parameters
• __namedParameters: FromDocSnapshotPayload
Returns
Promise
<FromDocSnapshotResult
<string
>>
Overrides
Source
packages/blocks/src/_common/adapters/mix-text.ts:86
fromSlice()
fromSlice(
slice
):Promise
<FromSliceSnapshotResult
<string
>>
Parameters
• slice: Slice
Returns
Promise
<FromSliceSnapshotResult
<string
>>
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:57
fromSliceSnapshot()
fromSliceSnapshot(
__namedParameters
):Promise
<FromSliceSnapshotResult
<string
>>
Parameters
• __namedParameters: FromSliceSnapshotPayload
Returns
Promise
<FromSliceSnapshotResult
<string
>>
Overrides
Source
packages/blocks/src/_common/adapters/mix-text.ts:115
toBlock()
toBlock(
payload
,doc
,parent
?,index
?):Promise
<BlockModel
<object
>>
Parameters
• payload: ToBlockSnapshotPayload
<string
>
• doc: Doc
• parent?: string
• index?: number
Returns
Promise
<BlockModel
<object
>>
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:56
toBlockSnapshot()
toBlockSnapshot(
payload
):BlockSnapshot
Parameters
• payload: ToBlockSnapshotPayload
<string
>
Returns
Overrides
Source
packages/blocks/src/_common/adapters/mix-text.ts:202
toDoc()
toDoc(
payload
):Promise
<Doc
>
Parameters
• payload: ToDocSnapshotPayload
<string
>
Returns
Promise
<Doc
>
Inherited from
Source
packages/framework/store/dist/adapter/base.d.ts:54
toDocSnapshot()
toDocSnapshot(
payload
):DocSnapshot
Parameters
• payload: ToDocSnapshotPayload
<string
>
Returns
Overrides
Source
packages/blocks/src/_common/adapters/mix-text.ts:132
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
Source
packages/framework/store/dist/adapter/base.d.ts:58
toSliceSnapshot()
toSliceSnapshot(
payload
):Promise
<null
|SliceSnapshot
>
Parameters
• payload: MixTextToSliceSnapshotPayload
Returns
Promise
<null
| SliceSnapshot
>
Overrides
Source
packages/blocks/src/_common/adapters/mix-text.ts:237