After looking through the docs and code for Editor.appendBlockInPage (IEditorProxy | @logseq/libs), there doesn’t appear to be a way to create a block by passing in my own uuid. This is useful for syncing across services in case the UUID originates from else where. Any way we could support this? For example:
It’s not supported. But I think this could be useful.
One thing to keep in mind with logseq is that the UUIDs aren’t stable. So when the user reindexes, it gets auto generated. So you’ll have to add the property id:: 62fe5f42-9e5b-44e0-b732-10950eb02c8a to it whenever creating a block that requires stable uuids as is apparent in your case.
By DB id I was referring to the numerical value, not the UUID:
but, are you saying that logseq has special handling that if it sees that property, it won’t reindex the block ref? or are you saying that the only way to guarantee stability is by storing properties and the block ref will always be subject to change?
In any case, I just fired a re-index and the uuids appeared to stay consistent before and after reindexing - in what cases does it change?
enable this setting in config.edn
Is this a user setting or a plugin setting? I’m less inclined to go this route if it’s the former
Does the trick to add an id property to make uuids stable work for pages? It seems like Logseq sometimes misinterprets the property as being for a property of a block on the page, instead of the page itself