Update web_src/js/features/comp/Paste.js

Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
Tyrone Yeh 2024-04-18 09:36:36 +08:00 committed by GitHub
parent 5af777b5c9
commit b7828ad174
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ async function handleClipboardFiles(editor, dropzone, files, e) {
if (file.type?.startsWith('image/')) {
const imgSrc = `/attachments/${file.uuid}`;
dropzone.dropzone.emit('thumbnail', file, imgSrc);
dropzone.querySelector(`img[src='${imgSrc}']`).style.maxWidth = '100%';
dropzone.querySelector(`img[src='${CSS.escape(imgSrc)}']`).style.maxWidth = '100%';
}
dropzone.dropzone.emit('complete', file);
const input = document.createElement('input');