Skip to content

BlockSuite API Documentation / @blocksuite/blocks / PlainTextAdapter

Class: PlainTextAdapter

Extends

Constructors

new PlainTextAdapter(undefined)

new PlainTextAdapter(): PlainTextAdapter

Returns

PlainTextAdapter

Overrides

@blocksuite/store.BaseAdapter.constructor

Source

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

Properties

_markdownAdapter

private _markdownAdapter: MarkdownAdapter

Source

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


configs

protected configs: Map<string, unknown>

Inherited from

@blocksuite/store.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:242


applyConfigs()

applyConfigs(configs): void

Parameters

configs: Map<string, unknown>

Returns

void

Inherited from

@blocksuite/store.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

@blocksuite/store.BaseAdapter.fromBlockSnapshot

Source

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


fromPageSnapshot()

fromPageSnapshot(__namedParameters): Promise<FromPageSnapshotResult<string>>

Parameters

__namedParameters: FromPageSnapshotPayload

Returns

Promise<FromPageSnapshotResult<string>>

Overrides

@blocksuite/store.BaseAdapter.fromPageSnapshot

Source

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


fromSliceSnapshot()

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

Parameters

__namedParameters: FromSliceSnapshotPayload

Returns

Promise<FromSliceSnapshotResult<string>>

Overrides

@blocksuite/store.BaseAdapter.fromSliceSnapshot

Source

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


toBlockSnapshot()

toBlockSnapshot(payload): BlockSnapshot

Parameters

payload: ToBlockSnapshotPayload<string>

Returns

BlockSnapshot

Overrides

@blocksuite/store.BaseAdapter.toBlockSnapshot

Source

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


toPageSnapshot()

toPageSnapshot(payload): PageSnapshot

Parameters

payload: ToPageSnapshotPayload<string>

Returns

PageSnapshot

Overrides

@blocksuite/store.BaseAdapter.toPageSnapshot

Source

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


toSliceSnapshot()

toSliceSnapshot(payload): null | SliceSnapshot

Parameters

payload: PlainTextToSliceSnapshotPayload

Returns

null | SliceSnapshot

Overrides

@blocksuite/store.BaseAdapter.toSliceSnapshot

Source

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


Generated using TypeDoc and typedoc-plugin-markdown.