mirror of
https://github.com/logseq/logseq.git
synced 2026-05-05 03:16:37 +00:00
fix: paste text instead of blocks when copied from another graph
Related to LOG-3123
This commit is contained in:
@@ -826,12 +826,15 @@
|
||||
|
||||
#?(:cljs
|
||||
(defn copy-to-clipboard!
|
||||
[text & {:keys [html blocks owner-window]}]
|
||||
[text & {:keys [graph html blocks owner-window]}]
|
||||
(let [data (clj->js
|
||||
(common-util/remove-nils-non-nested
|
||||
{:text text
|
||||
:html html
|
||||
:blocks (when (seq blocks) (pr-str (mapv #(dissoc % :block.temp/fully-loaded? %) blocks)))}))]
|
||||
:blocks (when (and graph (seq blocks))
|
||||
(pr-str
|
||||
{:graph graph
|
||||
:blocks (mapv #(dissoc % :block.temp/fully-loaded? %) blocks)}))}))]
|
||||
(if owner-window
|
||||
(utils/writeClipboard data owner-window)
|
||||
(utils/writeClipboard data)))))
|
||||
|
||||
Reference in New Issue
Block a user