mirror of https://github.com/logseq/logseq
Merge branch 'master' into feat/db
commit
517505cf53
|
@ -2065,7 +2065,7 @@
|
|||
sorted-blocks
|
||||
(drop 1 sorted-blocks))]
|
||||
(when element-id
|
||||
(insert-command! element-id "" format {}))
|
||||
(insert-command! element-id "" format {:end-pattern commands/command-trigger}))
|
||||
(let [exclude-properties [:id :template :template-including-parent]
|
||||
content-update-fn (fn [content]
|
||||
(->> content
|
||||
|
@ -2087,15 +2087,21 @@
|
|||
|
||||
:else
|
||||
true)]
|
||||
(outliner-tx/transact!
|
||||
{:outliner-op :insert-blocks
|
||||
:created-from-journal-template? journal?}
|
||||
(save-current-block!)
|
||||
(let [result (outliner-core/insert-blocks! blocks'
|
||||
target
|
||||
(assoc opts
|
||||
:sibling? sibling?'))]
|
||||
(edit-last-block-after-inserted! result))))))))
|
||||
(try
|
||||
(outliner-tx/transact!
|
||||
{:outliner-op :insert-blocks
|
||||
:created-from-journal-template? journal?}
|
||||
(save-current-block!)
|
||||
(let [result (outliner-core/insert-blocks! blocks'
|
||||
target
|
||||
(assoc opts
|
||||
:sibling? sibling?'))]
|
||||
(edit-last-block-after-inserted! result)))
|
||||
(catch :default ^js/Error e
|
||||
(notification/show!
|
||||
[:p.content
|
||||
(util/format "Template insert error: %s" (.-message e))]
|
||||
:error))))))))
|
||||
|
||||
(defn template-on-chosen-handler
|
||||
[element-id]
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
(redirect-to-page! page-name {}))
|
||||
([page-name {:keys [anchor push click-from-recent?]
|
||||
:or {click-from-recent? false}}]
|
||||
(when (seq page-name)
|
||||
(when (or (uuid? page-name) (seq page-name))
|
||||
(recent-handler/add-page-to-recent! (state/get-current-repo) page-name
|
||||
click-from-recent?)
|
||||
(let [m (cond->
|
||||
|
|
Loading…
Reference in New Issue