From 18212f006e07013bbc1b3fbb80be4acc7c277fd7 Mon Sep 17 00:00:00 2001 From: Petyo Ivanov Date: Thu, 2 Nov 2023 11:53:19 +0200 Subject: [PATCH] fix: prevent paste in code block Fixes #130 --- src/plugins/codemirror/CodeMirrorEditor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/codemirror/CodeMirrorEditor.tsx b/src/plugins/codemirror/CodeMirrorEditor.tsx index 7f76c287..43fe1aa7 100644 --- a/src/plugins/codemirror/CodeMirrorEditor.tsx +++ b/src/plugins/codemirror/CodeMirrorEditor.tsx @@ -15,7 +15,7 @@ export const CodeMirrorEditor = ({ language, nodeKey, code, focusEmitter }: Code codeMirrorRef.current?.getCodemirror()?.dom.addEventListener('paste', (e) => { e.stopPropagation() }) - }, [codeMirrorRef]) + }, [codeMirrorRef, language]) return (