Docs
Serializing Markdown
Serializing Markdown
Copy paste from Markdown to Slate.
Deserialize Markdown
Copy and paste Markdown content from popular Markdown editors like markdown-it.github.io/ into the editor for easy conversion and editing.
Installation
npm install @udecode/plate-serializer-md
Usage
Markdown -> Slate
import { createDeserializeMdPlugin } from '@udecode/plate-serializer-md';
const plugins = [
// ...otherPlugins,
createDeserializeMdPlugin(),
];
Slate -> Markdown
Currently supported plugins: paragraph, link, list, heading, italic, bold and code.
import { serializeMd } from '@udecode/plate-serializer-md';
const plugins = [
// ...supportedPlugins,
];
serializeMd(editor, { nodes });
API
createDeserializeMdPlugin
Options
Collapse all
Object where each key is a Markdown syntax element type and the value is a transformation function.
Object where each key is a Markdown syntax text type and the value is an object providing optional mark and transform functions.