API > @blocksuite/store > MarkdownAdapter
Class: MarkdownAdapter ​
Extends ​
Constructors ​
constructor ​
new MarkdownAdapter():
MarkdownAdapter
Returns ​
Inherited from ​
Methods ​
_astToMardown ​
private
_astToMardown(ast
):string
Parameters ​
Parameter | Type |
---|---|
ast | Root |
Returns ​
string
Defined In ​
packages/store/src/adapter/markdown.ts:733
_deltaToMdAST ​
private
_deltaToMdAST(deltas
,depth
=0
): (Delete
|Text
|Link
|Strong
|Emphasis
|InlineCode
)[]
Parameters ​
Parameter | Type | Default value |
---|---|---|
deltas | DeltaInsert [] | undefined |
depth | number | 0 |
Returns ​
(Delete
| Text
| Link
| Strong
| Emphasis
| InlineCode
)[]
Defined In ​
packages/store/src/adapter/markdown.ts:741
_markdownToAst ​
private
_markdownToAst(markdown
):Root
Parameters ​
Parameter | Type |
---|---|
markdown | string |
Returns ​
Root
Defined In ​
packages/store/src/adapter/markdown.ts:737
_mdastToDelta ​
private
_mdastToDelta(ast
):DeltaInsert
[]
Parameters ​
Parameter | Type |
---|---|
ast | MarkdownAST |
Returns ​
Defined In ​
packages/store/src/adapter/markdown.ts:787
_traverseMarkdown ​
private
_traverseMarkdown(markdown
,snapshot
,assets
?):Promise
<BlockSnapshot
>
Parameters ​
Parameter | Type |
---|---|
markdown | MarkdownAST |
snapshot | BlockSnapshot |
assets ? | AdapterAssetsManager |
Returns ​
Promise
< BlockSnapshot
>
Defined In ​
packages/store/src/adapter/markdown.ts:430
_traverseSnapshot ​
private
_traverseSnapshot(snapshot
,markdown
,assets
?):Promise
< {assetsIds
:string
[];ast
:Root
;} >
Parameters ​
Parameter | Type |
---|---|
snapshot | BlockSnapshot |
markdown | MarkdownAST |
assets ? | AdapterAssetsManager |
Returns ​
Promise
< {assetsIds
: string
[]; ast
: Root
;} >
Defined In ​
packages/store/src/adapter/markdown.ts:191
fromBlockSnapshot ​
fromBlockSnapshot(
__namedParameters
):Promise
<FromBlockSnapshotResult
<string
> >
Parameters ​
Parameter | Type |
---|---|
__namedParameters | FromBlockSnapshotPayload |
Returns ​
Promise
< FromBlockSnapshotResult
< string
> >
Overrides ​
Defined In ​
packages/store/src/adapter/markdown.ts:72
fromPageSnapshot ​
fromPageSnapshot(
__namedParameters
):Promise
<FromPageSnapshotResult
<string
> >
Parameters ​
Parameter | Type |
---|---|
__namedParameters | FromPageSnapshotPayload |
Returns ​
Promise
< FromPageSnapshotResult
< string
> >
Overrides ​
Defined In ​
packages/store/src/adapter/markdown.ts:53
fromSliceSnapshot ​
fromSliceSnapshot(
__namedParameters
):Promise
<FromSliceSnapshotResult
<string
> >
Parameters ​
Parameter | Type |
---|---|
__namedParameters | FromSliceSnapshotPayload |
Returns ​
Promise
< FromSliceSnapshotResult
< string
> >
Overrides ​
Defined In ​
packages/store/src/adapter/markdown.ts:91
toBlockSnapshot ​
toBlockSnapshot(
payload
):Promise
<BlockSnapshot
>
Parameters ​
Parameter | Type |
---|---|
payload | ToBlockSnapshotPayload < string > |
Returns ​
Promise
< BlockSnapshot
>
Overrides ​
Defined In ​
packages/store/src/adapter/markdown.ts:145
toPageSnapshot ​
toPageSnapshot(
payload
):Promise
<PageSnapshot
>
Parameters ​
Parameter | Type |
---|---|
payload | ToPageSnapshotPayload < string > |
Returns ​
Promise
< PageSnapshot
>
Overrides ​
Defined In ​
packages/store/src/adapter/markdown.ts:118
toSliceSnapshot ​
toSliceSnapshot(
payload
):Promise
<SliceSnapshot
>
Parameters ​
Parameter | Type |
---|---|
payload | MarkdownToSliceSnapshotPayload |
Returns ​
Promise
< SliceSnapshot
>
Overrides ​
Defined In ​
packages/store/src/adapter/markdown.ts:163