Fix copy paste in rich editor
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -18,6 +18,10 @@ export const MarkdownPasteExtension = Extension.create({
|
||||
key: markdownPasteKey,
|
||||
props: {
|
||||
handlePaste(view, event) {
|
||||
if (event.clipboardData?.getData("text/html")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const text = event.clipboardData?.getData("text/plain") ?? "";
|
||||
if (!hasMarkdown(text)) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user