roam-toolkit
roam-toolkit copied to clipboard
Better block creation
#19 failed to account for many edge cases. Especially regarding empty blocks - just pressing the same keys would give wildly different results.
Needed to add a series of DOM functions to find a block's surroundings. Caveat: rebuilt dom.js and it now needs to be imported as an object elsewhere.
Also first experiments with detectChange to confirm those actions. For now it just waits for any mutation after save.
I think this can be improved with the new ability to query the db directly (specifically querying for children/etc)