mirror of
https://github.com/logseq/logseq.git
synced 2026-05-02 09:56:31 +00:00
fix: api batch insert blocks
This commit is contained in:
@@ -1947,10 +1947,12 @@
|
||||
Block element: {:content :properties :children [block-1, block-2, ...]}"
|
||||
[target-block-id sibling? tree-vec format]
|
||||
(let [blocks (block-tree->blocks tree-vec format)
|
||||
target-block (db/pull target-block-id)]
|
||||
target-block (db/pull target-block-id)
|
||||
page-id (:db/id (:block/page target-block))
|
||||
blocks (block/with-parent-and-left page-id blocks)]
|
||||
(paste-blocks
|
||||
blocks
|
||||
{:target target-block
|
||||
{:target-block target-block
|
||||
:sibling? sibling?})))
|
||||
|
||||
(defn insert-template!
|
||||
|
||||
Reference in New Issue
Block a user