Fix copy paste in rich editor

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-27 18:06:14 +04:00
parent 9e4cf09e44
commit e473884b31

View File

@@ -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;