mirror of https://github.com/logseq/logseq
fix(api): options data type of edit_block api
parent
c46fa35095
commit
613b57e798
|
@ -437,10 +437,11 @@
|
||||||
(editor-handler/open-block-in-sidebar! (medley/uuid block-uuid)))
|
(editor-handler/open-block-in-sidebar! (medley/uuid block-uuid)))
|
||||||
|
|
||||||
(def ^:export edit_block
|
(def ^:export edit_block
|
||||||
(fn [block-uuid {:keys [pos] :or {pos :max} :as opts}]
|
(fn [block-uuid ^js opts]
|
||||||
(when-let [block-uuid (and block-uuid (medley/uuid block-uuid))]
|
(when-let [block-uuid (and block-uuid (medley/uuid block-uuid))]
|
||||||
(when-let [block (db-model/query-block-by-uuid block-uuid)]
|
(when-let [block (db-model/query-block-by-uuid block-uuid)]
|
||||||
(editor-handler/edit-block! block pos block-uuid)))))
|
(let [{:keys [pos] :or {pos :max}} (bean/->clj opts)]
|
||||||
|
(editor-handler/edit-block! block pos block-uuid))))))
|
||||||
|
|
||||||
(def ^:export insert_block
|
(def ^:export insert_block
|
||||||
(fn [block-uuid-or-page-name content ^js opts]
|
(fn [block-uuid-or-page-name content ^js opts]
|
||||||
|
|
Loading…
Reference in New Issue