Skip to content

Properties from Batchblock are not applied #476

@OptionalLion411

Description

@OptionalLion411

Search first

  • I searched and no similar issues were found

What Happened?

When using the latest plugin version (@logseq/libs ^0.2.1), the functions logseq.Editor.insertBlock and logseq.Editor.insertBatchBlock have different handling of properties. The first one handles and inserts them correctly, while the second does not.

Reproduce the Bug

  1. Create a basic plugin
  2. Test the following code:
const block = await logseq.Editor.getCurrentBlock();

await logseq.Editor.insertBlock(block.uuid, "insertBlock", {
  properties: {
    "block/tags": ["
     "logseq.property/status": 72,
     "logseq.property/priority": 77
    }
})
await logseq.Editor.insertBatchBlock(block.uuid, {
  content: "insertBatchBlock",
  properties: {
     "block/tags": ["Task"],
      "logseq.property/status": 72,
       "logseq.property/priority": 77
  }
})
  1. This creates two blocks, one with content "insertBlock" and the expected properties (the "Task" tag and two other), and one with content "insertBatchBlock" without any properties.

Expected Behavior

The function logseq.Editor.insertBatchBlock should correctly add the properties specified in the given object.

Metadata

Metadata

Labels

bugSomething isn't workingplugins

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions