mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
This commit is contained in:
parent
85f1fe259e
commit
feb95451fd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user