feat(api): add keepUUID option to insertBatchBlock

This commit is contained in:
Manu [tennox]
2022-12-01 14:58:27 +00:00
committed by Tienson Qin
parent 7a959053b9
commit 8a6e0bdcc2
4 changed files with 29 additions and 13 deletions

View File

@@ -634,10 +634,15 @@ export interface IEditorProxy extends Record<string, any> {
}>
) => Promise<BlockEntity | null>
/**
* @example https://github.com/logseq/logseq-plugin-samples/tree/master/logseq-reddit-hot-news
*
* `keepUUID` will allow you to set a custom UUID for blocks by setting their properties.id
*/
insertBatchBlock: (
srcBlock: BlockIdentity,
batch: IBatchBlock | Array<IBatchBlock>,
opts?: Partial<{ before: boolean; sibling: boolean }>
opts?: Partial<{ before: boolean; sibling: boolean, keepUUID: boolean }>
) => Promise<Array<BlockEntity> | null>
updateBlock: (