@@ -1,6 +1,6 @@
{
"name": "@logseq/libs",
- "version": "0.0.1-alpha.19",
+ "version": "0.0.1-alpha.20",
"description": "Logseq SDK libraries",
"main": "dist/lsplugin.user.js",
"typings": "index.d.ts",
@@ -280,7 +280,7 @@ export interface IEditorProxy extends Record<string, any> {
srcBlock: BlockIdentity,
batch: IBatchBlock | Array<IBatchBlock>,
opts?: Partial<{ before: boolean, sibling: boolean }>
- ) => Promise<null>
+ ) => Promise<Array<BlockEntity> | null>
updateBlock: (
@@ -683,7 +683,8 @@
nil)]
(when block-m
(outliner-insert-block! {:skip-save-current-block? true} block-m new-block sibling?)
- (ui-handler/re-render-root!))))))))
+ (ui-handler/re-render-root!)
+ new-block)))))))
(defn insert-first-page-block-if-not-exists!
[page-name]
@@ -241,8 +241,9 @@
new-block (editor-handler/api-insert-new-block!
content
{:block-uuid block-uuid
- :sibling? sibling
- :page page-name
+ :sibling? sibling
+ :before? before
+ :page page-name
:properties properties})]
(bean/->js (normalize-keyword-for-json new-block)))))