Can I do something like this via plug-ins: improving block navigation via keyboard (It's just an example)?

This post was last updated for 203 days ago, and the information may already be changed

Could I create a new command via plugin so that a block is moved to the beginning (or end) of the subtree where it is located? In other words: a new command to move a block so that it becomes the first (or last) of the siblings.

Or is this kind of thing only possible by changing the source code?

Thank you in advance for your attention!

    1 Operate
    Francisco updated this article at 2024-05-14 06:01:12

    Welcome to here!

    Here we can learn from each other how to use SiYuan, give feedback and suggestions, and build SiYuan together.

    Signup About
    Please input reply content ...
    • zxhd86 2

      Totally possible, use the plugin registration editor shortcut to call the /api/block/moveBlock api for free movement of blocks. API documentation can be found at https://github.com/siyuan-note/siyuan/blob/master/API.md

      The only difficulty is that you need to think for yourself how to find the first and last block of the original subtree in order to move in front of it or behind it. I'm sure there are many ways to do this.