1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Fixes #9003: Fix pasting text into Beta Editor with Cmd+V/Ctrl+V (#9004)

This commit is contained in:
Henry Heino 2023-10-05 02:54:10 -07:00 committed by GitHub
parent 85f1fe259e
commit feb95451fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ interface Props extends EditorProps {
style: React.CSSProperties;
pluginStates: PluginStates;
onEditorPaste: ()=> void;
onEditorPaste: (event: Event)=> void;
}
const Editor = (props: Props, ref: ForwardedRef<CodeMirrorControl>) => {
@ -37,8 +37,7 @@ const Editor = (props: Props, ref: ForwardedRef<CodeMirrorControl>) => {
}
const pasteEventHandler = (_editor: any, event: Event) => {
event.preventDefault();
props.onEditorPaste();
props.onEditorPaste(event);
};
editor.on('paste', pasteEventHandler);