Command Palette / Right click menu item to generate block and header reference

I considered writing up a separate feature request for a “Copy URL to block” command in the Command Palette or the right-click menu, but I figured it might be a better fit here.

Currently, to create a URL to a block, one needs to:

  1. Copy the URL to the current note.
  2. Manually create a ^block-id.
  3. Dig through Obsidian Help to rediscover the percent-encoded suffix you need for block links. Ah yes, %23%5E—how could I forget?
  4. Test the URL to make sure it works and you didn’t mess something up.
  5. Write down a solemn vow that the vault, note, and block ID will never, ever be moved or renamed, lest the URL breaks.

All of this just to link a block in a to-do app? It’s waaaaaaaaaaay too much hassle.

A dedicated “Copy URL to block” command would not only make linking to blocks outside of Obsidian significantly easier but would also help users discover this feature in the first place. I’d wager that most users don’t even know block links are possible unless they’ve googled it or stumbled upon the documentation.

…And I know for a fact that I spent more time piecing together a Templater script to automate this process than the script will ever save me :crazy_face:

image

2 Likes