mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 02:16:30 +00:00
fix: cut block lose nested children blocks
This commit is contained in:
@@ -1372,8 +1372,11 @@
|
||||
(defn cut-block!
|
||||
[block-id]
|
||||
(when-let [block (db/pull [:block/uuid block-id])]
|
||||
(let [content (:block/content block)]
|
||||
(common-handler/copy-to-clipboard-without-id-property! (:block/format block) content)
|
||||
(let [repo (state/get-current-repo)
|
||||
content (:block/content block)
|
||||
;; TODO: support org mode
|
||||
[md-content _tree] (compose-copied-blocks-contents-&-block-tree repo [block-id])]
|
||||
(common-handler/copy-to-clipboard-without-id-property! (:block/format block) md-content)
|
||||
(delete-block-aux! block true))))
|
||||
|
||||
(defn clear-last-selected-block!
|
||||
@@ -1865,11 +1868,6 @@
|
||||
(util/stop event)
|
||||
(state/append-current-edit-content! doc-text))))))
|
||||
|
||||
(defn- block-and-children-content
|
||||
[block-children]
|
||||
(-> (map :block/content block-children)
|
||||
string/join))
|
||||
|
||||
(defn- reorder-selected-blocks
|
||||
[blocks]
|
||||
(let [repo (state/get-current-repo)
|
||||
|
||||
Reference in New Issue
Block a user