diff --git a/src/plugins/codemirror/CodeMirrorEditor.tsx b/src/plugins/codemirror/CodeMirrorEditor.tsx index 4252ea1f..7f76c287 100644 --- a/src/plugins/codemirror/CodeMirrorEditor.tsx +++ b/src/plugins/codemirror/CodeMirrorEditor.tsx @@ -11,6 +11,12 @@ export const CodeMirrorEditor = ({ language, nodeKey, code, focusEmitter }: Code const [readOnly] = corePluginHooks.useEmitterValues('readOnly') const { setCode } = useCodeBlockEditorContext() + React.useEffect(() => { + codeMirrorRef.current?.getCodemirror()?.dom.addEventListener('paste', (e) => { + e.stopPropagation() + }) + }, [codeMirrorRef]) + return (