mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix: ci
This commit is contained in:
@@ -86,9 +86,13 @@
|
||||
;; todo: logseq/whiteboard-shapes is now text/html
|
||||
[text e html]
|
||||
(util/stop e)
|
||||
(p/let [clipboard-items (js/navigator.clipboard.read)
|
||||
blocks-blob ^js (.getType ^js (first clipboard-items)
|
||||
"web application/logseq")
|
||||
(p/let [clipboard-items (when (and js/window (gobj/get js/window "navigator") js/navigator.clipboard)
|
||||
(js/navigator.clipboard.read))
|
||||
blocks-blob ^js (try
|
||||
(.getType ^js (first clipboard-items)
|
||||
"web application/logseq")
|
||||
(catch :default _e
|
||||
nil))
|
||||
blocks-str (when blocks-blob (.text blocks-blob))
|
||||
copied-blocks (when blocks-str
|
||||
(gp-util/safe-read-string blocks-str))]
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
[frontend.state :as state]
|
||||
[frontend.util :as util]
|
||||
[logseq.graph-parser.util :as gp-util]
|
||||
[cljs.spec.alpha :as s]))
|
||||
[cljs.spec.alpha :as s]
|
||||
[frontend.config :as config]))
|
||||
|
||||
(s/def ::block-map (s/keys :req [:db/id]
|
||||
:opt [:block/page :block/left :block/parent]))
|
||||
@@ -557,7 +558,7 @@
|
||||
[{:block/uuid (tree/-get-id next)
|
||||
:block/left (:db/id left)}]))
|
||||
full-tx (util/concat-without-nil uuids-tx tx next-tx)]
|
||||
(when (and replace-empty-target? (state/editing?))
|
||||
(when (and replace-empty-target? (not config/test?) (state/editing?))
|
||||
(state/set-edit-content! (state/get-edit-input-id) (:block/content (first blocks))))
|
||||
{:tx-data full-tx
|
||||
:blocks tx}))))
|
||||
|
||||
@@ -250,8 +250,6 @@ export const getClipText = (cb, errorHandler) => {
|
||||
}
|
||||
|
||||
export const writeClipboard = ({text, html, blocks}, ownerWindow) => {
|
||||
console.log("block")
|
||||
console.log(blocks)
|
||||
if (Capacitor.isNativePlatform()) {
|
||||
CapacitorClipboard.write({ string: text });
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user