Search first
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
- Create a basic plugin
- 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
}
})
- 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.
Search first
What Happened?
When using the latest plugin version (@logseq/libs ^0.2.1), the functions
logseq.Editor.insertBlockandlogseq.Editor.insertBatchBlockhave different handling of properties. The first one handles and inserts them correctly, while the second does not.Reproduce the Bug
Expected Behavior
The function
logseq.Editor.insertBatchBlockshould correctly add the properties specified in the given object.