slate-mark
Slate to Markdown parser.
Compatible with plate-editor out of the box.
Usage
import type { TNode } from '@udecode/plate-core'
import { plateToMarkdown, plateToMarkdownAsync } from 'slate-mark'
const myInput: TNode = [
{
type: 'p',
children: [
{
text: 'Hello `universe !!!`',
},
],
},
...
]
const output = plateToMarkdown(myInput)
plateToMarkdownAsync(myInput)
.then(result => {
})
Please make sure you have either @udecode/plate-core
or @udecode/plate
as your dependency if you are using it with typescript. The input type for the parser utility functions is TNode