From 62102e7d11acccb30c954ffb33eef75540b9d90a Mon Sep 17 00:00:00 2001 From: ZhurmilovVadim Date: Fri, 31 May 2024 22:51:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20paste?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/src/components/Editor/Editor.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/src/components/Editor/Editor.ts b/public/src/components/Editor/Editor.ts index e47e1f0..21dc55a 100644 --- a/public/src/components/Editor/Editor.ts +++ b/public/src/components/Editor/Editor.ts @@ -46,9 +46,10 @@ export class Editor { } } - event.preventDefault(); + if (isInEditor(document.getSelection().anchorNode)) { + event.preventDefault(); let paste = (event.clipboardData).getData("text"); const selection = window.getSelection(); if (!selection.rangeCount) return;