mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 17:06:23 +00:00
fix: drag-drop / copy-paste should work for multiple files (#11214)
Co-authored-by: Gabriel Horner <97210743+logseq-cldwalker@users.noreply.github.com>
This commit is contained in:
@@ -219,10 +219,11 @@
|
||||
(when id
|
||||
(let [clipboard-data (gobj/get e "clipboardData")
|
||||
files (.-files clipboard-data)]
|
||||
(when-let [file (first files)]
|
||||
(when-let [block (state/get-edit-block)]
|
||||
(editor-handler/upload-asset id #js[file] (:block/format block)
|
||||
editor-handler/*asset-uploading? true)))
|
||||
(loop [files files]
|
||||
(when-let [file (first files)]
|
||||
(when-let [block (state/get-edit-block)]
|
||||
(editor-handler/upload-asset id #js[file] (:block/format block) editor-handler/*asset-uploading? true))
|
||||
(recur (rest files))))
|
||||
(util/stop e))))
|
||||
|
||||
(defn editor-on-paste!
|
||||
|
||||
Reference in New Issue
Block a user