From 06f633ef7903840ac8388f14ec8bb131ebf47465 Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 5 May 2022 10:38:30 -0500 Subject: [PATCH 1/2] Prefer pasting text over html --- src/plugins/MarkdownPaste.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/MarkdownPaste.ts b/src/plugins/MarkdownPaste.ts index 93ef71b76..3007ef1ac 100755 --- a/src/plugins/MarkdownPaste.ts +++ b/src/plugins/MarkdownPaste.ts @@ -66,7 +66,7 @@ export default class MarkdownPaste extends Extension { // otherwise, if we have html on the clipboard then fallback to the // default HTML parser behavior that comes with Prosemirror. - if (text.length === 0 || html) return false; + if (text.length === 0 && html) return false; event.preventDefault(); From 10c72e486311bf4a33c25481930f0b6518609adb Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 5 May 2022 10:55:19 -0500 Subject: [PATCH 2/2] Update the comment too --- src/plugins/MarkdownPaste.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/MarkdownPaste.ts b/src/plugins/MarkdownPaste.ts index 3007ef1ac..79d527074 100755 --- a/src/plugins/MarkdownPaste.ts +++ b/src/plugins/MarkdownPaste.ts @@ -64,7 +64,7 @@ export default class MarkdownPaste extends Extension { return true; } - // otherwise, if we have html on the clipboard then fallback to the + // otherwise, if we only have html on the clipboard then fallback to the // default HTML parser behavior that comes with Prosemirror. if (text.length === 0 && html) return false;