This commit is contained in:
Vanessa 2023-03-20 21:02:37 +08:00
parent 91457dc2cd
commit 9cae635647
3 changed files with 17 additions and 10 deletions

View file

@ -78,7 +78,7 @@ export const pasteText = (protyle: IProtyle, textPlain: string, nodeElement: Ele
processRender(protyle.wysiwyg.element);
highlightRender(protyle.wysiwyg.element);
filterClipboardHint(protyle, textPlain);
scrollCenter(protyle);
scrollCenter(protyle, undefined, false, "smooth");
};
export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEvent) & { target: HTMLElement }) => {
@ -262,7 +262,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
processRender(protyle.wysiwyg.element);
highlightRender(protyle.wysiwyg.element);
filterClipboardHint(protyle, response.data);
scrollCenter(protyle);
scrollCenter(protyle, undefined, false, "smooth");
});
return;
} else if (files && files.length > 0) {
@ -285,5 +285,5 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
processRender(protyle.wysiwyg.element);
highlightRender(protyle.wysiwyg.element);
}
scrollCenter(protyle);
scrollCenter(protyle, undefined, false, "smooth");
};