Keep text when inserting link to block

So, there seems to be missing documentation, and something broken.
from the docs I should be able to type #^ after a link and select a block to link to.

This doesn’t happen. I get a list that only shows a header from the current page.

I read in a forum post I can use ^^ instead. This does bring up a list of blocks I can select from. (I can’t find ‘official’ documentation on this though.)

The problem is if I select any of the options from the list, it removes the text I’ve typed, and just creates a blank.


It breaks the flow having to go back and retype each link.
Is there anyway to find documentation on ^^ or a setting where typing ^^ doesn’t remove the link text I’ve already typed?

The steps to linking to a block are detailed here:

Maybe that helps a bit?

If you want to add link/display text, you do it as the last step.

[[note to link to#^667aae|my display text]]

I’ve discovered two things.

  1. the ^^ vs #^
    Typing ^^ brings up a list of all blocks.
    Typing #^ waits for me to start typing and then brings up a filtered list of blocks.

  2. The pipe only works if wikilinks are enabled.

Although the docs say both are acceptable, the behavior is different if using markdown links.
And this only seems to be the case with block links. The flow for linking to other notes and external documents feels very natural compared to what happens when using a caret ^ without wikilinks enabled.

When I type [[#^ and then select a block item, its immediately formatted to:
[](#^blockid) with the cursor at the start of the parentheses.
If I type ‘|my text’ , I end up with:
[](|my text#^blockid) which just gets rendered as []

Same if I move the cursor back to end of where I was typing.
I end up with:
[](#^blockid|my text) which just gets rendered as []

Moving the cursor and putting ‘my text’ in the square brackets functions as expected.

[my text](#^blockid) renders ‘my text’ as a link to ^blockid.

So, I guess my issue is different behaviors because the cursor doesn’t get inserted in the right spot after block link is created.

It’s trivial to tap the arrow key a couple times. And now that I understand more about what’s happening It’s work around-able.

1 Like

Just for the sake of completeness:

The title is accurate. If I have text selected and type [ or [[, the text gets wrapped in brackets or double brackets respectively. Then typing # or ^ overwrites selection with that character.

None of the link handlers automatically deselect the text for me. This was confusion on my part because of my workflow.

Generally If I am creating links to other notes, I usually have the name typed and then just select and hit [. Done. Then, I click somewhere else and type there.
If I do not move the cursor anywhere, or deselect the text, it gets replaced by whatever I type next.

So, if I want to avoid replacing the text that is selected, I simply have to deselect it before I start typing something.
Do we get dumb badges?

1 Like

Thanks for the clear write-up. I’ll point Markdown link users here, for sure.

I was assuming [[wikilinks]] from your first post - but you didn’t say one way or the other - and that’s on me. The documentation is being actively worked on, but not much on using Obsidian’s auto-complete features with Markdown links (that I could see).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.