What's the right way to auto-convert pasted clipboard markdown content to yoopta blocks? #302
-
By default HTML converts automatically, but markdown doesn't. Wondering if there's an idiomatic way to do so? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@trancethehuman I was thinking about it and I got an idea. But what if I add new prop (something like Example: import YooptaEditor, { createYooptaEditor } from '@yoopta/editor';
import { markdown, html, email } from '@yoopta/exports'
import { useMemo } from 'react';
const BasicExample = () => {
const editor: YooEditor = useMemo(() => createYooptaEditor(), []);
return (
<YooptaEditor
...other props
parsers={{
html: html,
markdown: markdown,
email: email
}}
/>
);
}; And the editor will analyze the format in which the contents from the clipboard are inserted, and deserialize it using the parser prop into the Yoopta content |
Beta Was this translation helpful? Give feedback.
-
Yeah that sounds great! |
Beta Was this translation helpful? Give feedback.
Cool! I'll convert this into issue