mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 17:06:23 +00:00
fix: can't paste headings
fixes https://github.com/logseq/db-test-cn/issues/7
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
[frontend.util.text :as text-util]
|
||||
[frontend.format.mldoc :as mldoc]
|
||||
[lambdaisland.glogi :as log]
|
||||
[promesa.core :as p]))
|
||||
[promesa.core :as p]
|
||||
[frontend.config :as config]))
|
||||
|
||||
(defn- paste-text-parseable
|
||||
[format text]
|
||||
@@ -183,7 +184,10 @@
|
||||
(if (and (seq blocks) (= graph (state/get-current-repo)))
|
||||
;; Handle internal paste
|
||||
(let [revert-cut-txs (get-revert-cut-txs blocks)
|
||||
keep-uuid? (= (state/get-block-op-type) :cut)]
|
||||
keep-uuid? (= (state/get-block-op-type) :cut)
|
||||
blocks (if (config/db-based-graph? (state/get-current-repo))
|
||||
(map (fn [b] (dissoc b :block/properties)) blocks)
|
||||
blocks)]
|
||||
(editor-handler/paste-blocks blocks {:revert-cut-txs revert-cut-txs
|
||||
:keep-uuid? keep-uuid?}))
|
||||
(paste-copied-text input text html)))
|
||||
|
||||
Reference in New Issue
Block a user