Merge branch 'feat/db' into refactor/dsl-query

This commit is contained in:
Tienson Qin
2024-10-31 20:57:40 +08:00
92 changed files with 12165 additions and 1112 deletions

View File

@@ -104,8 +104,8 @@
(.getType ^js (first clipboard-items)
"web application/logseq"))))
blocks-str (when blocks-blob (.text blocks-blob))]
(when blocks-str
(common-util/safe-read-map-string blocks-str))))
(when blocks-str
(common-util/safe-read-map-string blocks-str))))
(defn- markdown-blocks?
[text]
@@ -232,10 +232,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!