mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix: can't paste asset
fixes https://github.com/logseq/db-test/issues/575
This commit is contained in:
@@ -326,7 +326,7 @@
|
||||
(declare save-current-block!)
|
||||
(defn outliner-insert-block!
|
||||
[config current-block new-block {:keys [sibling? keep-uuid? ordered-list?
|
||||
replace-empty-target?]}]
|
||||
replace-empty-target? outliner-op]}]
|
||||
(let [ref-query-top-block? (and (or (:ref? config)
|
||||
(:custom-query? config))
|
||||
(not (:ref-query-child? config)))
|
||||
@@ -359,7 +359,8 @@
|
||||
(outliner-op/insert-blocks! [new-block'] current-block {:sibling? sibling?
|
||||
:keep-uuid? keep-uuid?
|
||||
:ordered-list? ordered-list?
|
||||
:replace-empty-target? replace-empty-target?}))))
|
||||
:replace-empty-target? replace-empty-target?
|
||||
:outliner-op outliner-op}))))
|
||||
|
||||
(defn- block-self-alone-when-insert?
|
||||
[config uuid]
|
||||
@@ -559,7 +560,8 @@
|
||||
[content {:keys [page block-uuid
|
||||
sibling? before? start? end?
|
||||
properties
|
||||
custom-uuid replace-empty-target? edit-block? ordered-list? other-attrs]
|
||||
custom-uuid replace-empty-target? edit-block? ordered-list? other-attrs
|
||||
outliner-op]
|
||||
:or {sibling? false
|
||||
before? false
|
||||
edit-block? true}
|
||||
@@ -640,6 +642,7 @@
|
||||
{:sibling? sibling?
|
||||
:keep-uuid? true
|
||||
:ordered-list? ordered-list?
|
||||
:outliner-op outliner-op
|
||||
:replace-empty-target? replace-empty-target?})))
|
||||
(when edit-block?
|
||||
(if (and replace-empty-target?
|
||||
|
||||
@@ -213,6 +213,7 @@
|
||||
(editor-handler/api-insert-new-block! ""
|
||||
{:block-uuid (:block/uuid current-block)
|
||||
:sibling? true
|
||||
:outliner-op :paste
|
||||
:replace-empty-target? true
|
||||
:other-attrs {:block/link (:db/id (db/entity [:block/uuid block-id]))}})
|
||||
(state/clear-edit!)))))
|
||||
|
||||
Reference in New Issue
Block a user