BlockSuite API Documentation / @blocksuite/blocks / PlainTextAdapter
Class: PlainTextAdapter
Extends
BaseAdapter
<PlainText
>
Constructors
new PlainTextAdapter()
new PlainTextAdapter(
job
,blockMatchers
):PlainTextAdapter
Parameters
job
blockMatchers
BlockPlainTextAdapterMatcher
[] = defaultBlockPlainTextAdapterMatchers
Returns
Overrides
Defined in
packages/blocks/src/_common/adapters/plain-text/plain-text.ts:52
Properties
blockMatchers
readonly
blockMatchers:BlockPlainTextAdapterMatcher
[] =defaultBlockPlainTextAdapterMatchers
Defined in
packages/blocks/src/_common/adapters/plain-text/plain-text.ts:54
deltaConverter
deltaConverter:
PlainTextDeltaConverter
Defined in
packages/blocks/src/_common/adapters/plain-text/plain-text.ts:50
job
job:
Job
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:44
Accessors
configs
Get Signature
get configs():
Map
<string
,string
>
Returns
Map
<string
, string
>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:45
Methods
fromBlock()
fromBlock(
model
):Promise
<undefined
|FromBlockSnapshotResult
<string
>>
Parameters
model
Returns
Promise
<undefined
| FromBlockSnapshotResult
<string
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:47
fromBlockSnapshot()
fromBlockSnapshot(
__namedParameters
):Promise
<FromBlockSnapshotResult
<string
>>
Parameters
__namedParameters
Returns
Promise
<FromBlockSnapshotResult
<string
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/plain-text/plain-text.ts:111
fromDoc()
fromDoc(
doc
):Promise
<undefined
|FromDocSnapshotResult
<string
>>
Parameters
doc
Returns
Promise
<undefined
| FromDocSnapshotResult
<string
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:49
fromDocSnapshot()
fromDocSnapshot(
__namedParameters
):Promise
<FromDocSnapshotResult
<string
>>
Parameters
__namedParameters
Returns
Promise
<FromDocSnapshotResult
<string
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/plain-text/plain-text.ts:121
fromSlice()
fromSlice(
slice
):Promise
<undefined
|FromSliceSnapshotResult
<string
>>
Parameters
slice
Returns
Promise
<undefined
| FromSliceSnapshotResult
<string
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:51
fromSliceSnapshot()
fromSliceSnapshot(
__namedParameters
):Promise
<FromSliceSnapshotResult
<string
>>
Parameters
__namedParameters
Returns
Promise
<FromSliceSnapshotResult
<string
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/plain-text/plain-text.ts:140
toBlock()
toBlock(
payload
,doc
,parent
?,index
?):Promise
<undefined
|BlockModel
<object
,object
>>
Parameters
payload
ToBlockSnapshotPayload
<string
>
doc
parent?
string
index?
number
Returns
Promise
<undefined
| BlockModel
<object
, object
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:53
toBlockSnapshot()
toBlockSnapshot(
payload
):BlockSnapshot
Parameters
payload
ToBlockSnapshotPayload
<string
>
Returns
Overrides
Defined in
packages/blocks/src/_common/adapters/plain-text/plain-text.ts:157
toDoc()
toDoc(
payload
):Promise
<undefined
|Doc
>
Parameters
payload
ToDocSnapshotPayload
<string
>
Returns
Promise
<undefined
| Doc
>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:55
toDocSnapshot()
toDocSnapshot(
payload
):DocSnapshot
Parameters
payload
ToDocSnapshotPayload
<string
>
Returns
Overrides
Defined in
packages/blocks/src/_common/adapters/plain-text/plain-text.ts:192
toSlice()
toSlice(
payload
,doc
,parent
?,index
?):Promise
<undefined
|Slice
>
Parameters
payload
ToSliceSnapshotPayload
<string
>
doc
parent?
string
index?
number
Returns
Promise
<undefined
| Slice
>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:57
toSliceSnapshot()
toSliceSnapshot(
payload
):null
|SliceSnapshot
Parameters
payload
PlainTextToSliceSnapshotPayload
Returns
null
| SliceSnapshot
Overrides
Defined in
packages/blocks/src/_common/adapters/plain-text/plain-text.ts:262