mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-26 23:51:14 +02:00
refactor: remove onPaste handler from InlineMentionEditor for cleaner code
This commit is contained in:
parent
19a9a84b45
commit
7ecf01f308
1 changed files with 1 additions and 7 deletions
|
|
@ -733,15 +733,9 @@ export const InlineMentionEditor = forwardRef<InlineMentionEditorRef, InlineMent
|
|||
const editableProps = useMemo(
|
||||
() => ({
|
||||
placeholder,
|
||||
onPaste: (e: React.ClipboardEvent<HTMLDivElement>) => {
|
||||
e.preventDefault();
|
||||
const text = e.clipboardData.getData("text/plain");
|
||||
const tf = editor.tf as { insertText: (value: string) => void };
|
||||
tf.insertText(text);
|
||||
},
|
||||
onKeyDown: handleKeyDown,
|
||||
}),
|
||||
[editor, handleKeyDown, placeholder]
|
||||
[handleKeyDown, placeholder]
|
||||
);
|
||||
|
||||
const mentionEditorContextValue = useMemo<MentionEditorContextValue>(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue