BlockSuite API Documentation / @blocksuite/blocks / MarkdownTransformer
Variable: MarkdownTransformer
const
MarkdownTransformer:object
Type declaration
exportDoc()
exportDoc: (
doc
) =>Promise
<void
>
Exports a doc to a Markdown file or a zip archive containing Markdown and assets.
Parameters
doc
The doc to export
Returns
Promise
<void
>
A Promise that resolves when the export is complete
importMarkdownToBlock()
importMarkdownToBlock: (
options
) =>Promise
<void
>
Imports Markdown content into a specific block within a doc.
Parameters
options
ImportMarkdownToBlockOptions
Object containing import options
Returns
Promise
<void
>
A Promise that resolves when the import is complete
importMarkdownToDoc()
importMarkdownToDoc: (
options
) =>Promise
<undefined
|string
>
Imports Markdown content into a new doc within a collection.
Parameters
options
ImportMarkdownToDocOptions
Object containing import options
Returns
Promise
<undefined
| string
>
A Promise that resolves to the ID of the newly created doc, or undefined if import fails
importMarkdownZip()
importMarkdownZip: (
options
) =>Promise
<string
[]>
Imports a zip file containing Markdown files and assets into a collection.
Parameters
options
ImportMarkdownZipOptions
Object containing import options
Returns
Promise
<string
[]>
A Promise that resolves to an array of IDs of the newly created docs
Defined in
packages/blocks/src/_common/transformers/markdown.ts:213