fix: whiteboard path-refs

This commit is contained in:
Peng Xiao
2022-07-24 10:26:20 +08:00
parent 6bf4b05141
commit cefe46072e
5 changed files with 50 additions and 52 deletions

View File

@@ -71,7 +71,9 @@
input (state/get-input)
text (string/replace text "\r\n" "\n") ;; Fix for Windows platform
whiteboard-shape? (= "logseq/whiteboard-shapes" (gobj/get (try-parse-as-json text) "type"))
text (when whiteboard-shape? (str "((" (gobj/getValueByKeys (try-parse-as-json text) "shapes" 0 "id") "))"))
text (if whiteboard-shape?
(str "((" (gobj/getValueByKeys (try-parse-as-json text) "shapes" 0 "id") "))")
text)
internal-paste? (and
(seq (:copy/blocks copied-blocks))
;; not copied from the external clipboard