Skip to content

BlockSuite API Documentation / @blocksuite/blocks / PlainTextAdapter

Class: PlainTextAdapter

Extends

Constructors

new PlainTextAdapter(undefined)

new PlainTextAdapter(): PlainTextAdapter

Returns

PlainTextAdapter

Inherited from

BaseAdapter.constructor

Properties

configs

protected configs: Map<string, unknown>

Inherited from

BaseAdapter.configs

Source

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

Methods

_traverseSnapshot()

private _traverseSnapshot(snapshot): Promise<object>

Parameters

snapshot: BlockSnapshot

Returns

Promise<object>

plaintext

plaintext: string

Source

packages/blocks/src/_common/adapters/plain-text.ts:235


applyConfigs()

applyConfigs(configs): void

Parameters

configs: Map<string, unknown>

Returns

void

Inherited from

BaseAdapter.applyConfigs

Source

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


fromBlockSnapshot()

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

Parameters

__namedParameters: FromBlockSnapshotPayload

Returns

Promise<FromBlockSnapshotResult<string>>

Overrides

BaseAdapter.fromBlockSnapshot

Source

packages/blocks/src/_common/adapters/plain-text.ts:55


fromDocSnapshot()

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

Parameters

__namedParameters: FromDocSnapshotPayload

Returns

Promise<FromDocSnapshotResult<string>>

Overrides

BaseAdapter.fromDocSnapshot

Source

packages/blocks/src/_common/adapters/plain-text.ts:36


fromSliceSnapshot()

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

Parameters

__namedParameters: FromSliceSnapshotPayload

Returns

Promise<FromSliceSnapshotResult<string>>

Overrides

BaseAdapter.fromSliceSnapshot

Source

packages/blocks/src/_common/adapters/plain-text.ts:65


toBlockSnapshot()

toBlockSnapshot(payload): BlockSnapshot

Parameters

payload: ToBlockSnapshotPayload<string>

Returns

BlockSnapshot

Overrides

BaseAdapter.toBlockSnapshot

Source

packages/blocks/src/_common/adapters/plain-text.ts:152


toDocSnapshot()

toDocSnapshot(payload): DocSnapshot

Parameters

payload: ToDocSnapshotPayload<string>

Returns

DocSnapshot

Overrides

BaseAdapter.toDocSnapshot

Source

packages/blocks/src/_common/adapters/plain-text.ts:82


toSliceSnapshot()

toSliceSnapshot(payload): null | SliceSnapshot

Parameters

payload: PlainTextToSliceSnapshotPayload

Returns

null | SliceSnapshot

Overrides

BaseAdapter.toSliceSnapshot

Source

packages/blocks/src/_common/adapters/plain-text.ts:187