Skip to content

Commit

Permalink
use option object for handleClipboardText
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Jun 19, 2024
1 parent 358cd19 commit 1c8c42d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web_src/js/features/comp/Paste.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async function handleClipboardImages(editor, dropzone, images, e) {
}
}

function handleClipboardText(textarea, e, text, isShiftDown) {
function handleClipboardText(textarea, e, {text, isShiftDown}) {
// pasting with "shift" means "paste as original content" in most applications
if (isShiftDown) return; // let the browser handle it

Expand Down Expand Up @@ -161,7 +161,7 @@ export function initTextareaPaste(textarea, dropzone) {
if (images.length) {
handleClipboardImages(new TextareaEditor(textarea), dropzone, images, e);
} else if (text) {
handleClipboardText(textarea, e, text, isShiftDown);
handleClipboardText(textarea, e, {text, isShiftDown});
}
});
}

0 comments on commit 1c8c42d

Please sign in to comment.