BlockSuite API Documentation / @blocksuite/blocks / MarkdownAdapter
Class: MarkdownAdapter
Contents
Extends
Constructors
new MarkdownAdapter(undefined)
new MarkdownAdapter():
MarkdownAdapter
Returns
Inherited from
@blocksuite/store.BaseAdapter.constructor
Properties
configs
protected
configs:Map
<string
,unknown
>
Inherited from
@blocksuite/store.BaseAdapter.configs
Source
packages/store/dist/adapter/base.d.ts:41
Methods
_astToMarkdown()
private
_astToMarkdown(ast
):string
Parameters
• ast: Root
Returns
string
Source
packages/blocks/src/_common/adapters/markdown.ts:953
_deltaToMdAST()
private
_deltaToMdAST(deltas
,depth
): (Link
|Text
|Strong
|Delete
|Emphasis
|InlineCode
)[]
Parameters
• deltas: DeltaInsert
[]
• depth: number
= 0
Returns
(Link
| Text
| Strong
| Delete
| Emphasis
| InlineCode
)[]
Source
packages/blocks/src/_common/adapters/markdown.ts:967
_markdownToAst()
private
_markdownToAst(markdown
):Root
Parameters
• markdown: string
Returns
Root
Source
packages/blocks/src/_common/adapters/markdown.ts:963
_mdastToDelta()
private
_mdastToDelta(ast
):DeltaInsert
[]
Parameters
• ast: MarkdownAST
Returns
Source
packages/blocks/src/_common/adapters/markdown.ts:1020
_traverseMarkdown()
private
_traverseMarkdown(markdown
,snapshot
,assets
?):Promise
<BlockSnapshot
>
Parameters
• markdown: MarkdownAST
• snapshot: BlockSnapshot
• assets?: AssetsManager
Returns
Promise
<BlockSnapshot
>
Source
packages/blocks/src/_common/adapters/markdown.ts:617
_traverseSnapshot()
private
_traverseSnapshot(snapshot
,markdown
,assets
?):Promise
<Object
>
Parameters
• snapshot: BlockSnapshot
• markdown: MarkdownAST
• assets?: AssetsManager
Returns
Promise
<Object
>
assetsIds
assetsIds:
string
[]ast
ast:
Root
Source
packages/blocks/src/_common/adapters/markdown.ts:235
applyConfigs()
applyConfigs(
configs
):void
Parameters
• configs: Map
<string
, unknown
>
Returns
void
Inherited from
@blocksuite/store.BaseAdapter.applyConfigs
Source
packages/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/markdown.ts:75
fromPageSnapshot()
fromPageSnapshot(
__namedParameters
):Promise
<FromPageSnapshotResult
<string
>>
Parameters
• __namedParameters: FromPageSnapshotPayload
Returns
Promise
<FromPageSnapshotResult
<string
>>
Overrides
@blocksuite/store.BaseAdapter.fromPageSnapshot
Source
packages/blocks/src/_common/adapters/markdown.ts:56
fromSliceSnapshot()
fromSliceSnapshot(
__namedParameters
):Promise
<FromSliceSnapshotResult
<string
>>
Parameters
• __namedParameters: FromSliceSnapshotPayload
Returns
Promise
<FromSliceSnapshotResult
<string
>>
Overrides
@blocksuite/store.BaseAdapter.fromSliceSnapshot
Source
packages/blocks/src/_common/adapters/markdown.ts:94
toBlockSnapshot()
toBlockSnapshot(
payload
):Promise
<BlockSnapshot
>
Parameters
• payload: ToBlockSnapshotPayload
<string
>
Returns
Promise
<BlockSnapshot
>
Overrides
@blocksuite/store.BaseAdapter.toBlockSnapshot
Source
packages/blocks/src/_common/adapters/markdown.ts:179
toPageSnapshot()
toPageSnapshot(
payload
):Promise
<PageSnapshot
>
Parameters
• payload: ToPageSnapshotPayload
<string
>
Returns
Promise
<PageSnapshot
>
Overrides
@blocksuite/store.BaseAdapter.toPageSnapshot
Source
packages/blocks/src/_common/adapters/markdown.ts:121
toSliceSnapshot()
toSliceSnapshot(
payload
):Promise
<SliceSnapshot
>
Parameters
• payload: MarkdownToSliceSnapshotPayload
Returns
Promise
<SliceSnapshot
>
Overrides
@blocksuite/store.BaseAdapter.toSliceSnapshot
Source
packages/blocks/src/_common/adapters/markdown.ts:202
Generated using typedoc-plugin-markdown and TypeDoc