plate
plate copied to clipboard
Serialize Markdown doesn't work with lists
Description
Ordered / Unordered lists do not get serialized to markdown using serializeMd from @udecode/plate-serializer-md
This is how I'm using the plugin with my plate instance
<Plate
initialValue={initialValue}
onChange={(e) => {
const editor = editorRef.current;
if (!editor) {
return;
}
console.log(serializeMd(editor, { nodes: e }))
}}
editorRef={editorRef}
plugins={plugins}
>
<FixedToolbar>
<FixedToolbarButtons />
</FixedToolbar>
<Editor className='min-h-[300px] p-[20px]' />
</Plate>
Plate version
34
Slate React version
0.105.0
Screenshots
No response
Logs
No response
Browsers
No response
Ah I just realised that I was using the plugin wrong. I managed to fix it by passing editor.nodes instead of the event :)