Anchors and Blocks

TLDR:

1

Brackets-Display Name

Type [For Display]

2

(Display)

Type() With the actual link to the note including .md

(note.md)

3

Follow .md with Anchor

(note.md#^Block-ID)

Block ID is the ID of a "line" in a note, this is what creates the anchor.

4

Quick Method

Type [[ You will then click the note that has the anchor you want to link, so go ahead and click it. Then put keyboard cursor next to it to expand the full link past the short (display name). after the potentially long link, find the .md after the .md put - .md#^

The # is a header the ^ is the anchor What's after the ^ is the anchor name. For instance for my tutorial I'm almost done with, the anchor you will see in the upcoming video looks like

MarkDown
Example:
[5 Annotation Techniques (Canvas & Markdown)](Tutorial/Books/OutLine/5%20Annotation%20Techniques%20(Canvas%20&%20Markdown).md#^Test2)

The correct usage in Obsidian Canvas (or Obsidian in general) does follow the Markdown-style link syntax, not the standard [[...]] syntax, for anchors that are both precise and functional.

Let me break it down correctly:


The correct format for referencing a block ID (#^anchor-id) in Obsidian is as follows:

[Display Text](File Path.md#^block-id)

Why This Works

  • The Markdown-style link [Display Text](...) ensures precise control over file paths and anchors.

  • It avoids issues caused by [[...]] syntax where auto-generated anchors or autocomplete might overwrite existing block IDs.


Example Workflow

1. Anchor Setup

In your note, create the block with an anchor:

This is a block I want to link to. ^Test2

2. Link to the Anchor in Canvas

Inside a Canvas text box:

  1. Manually type the following Markdown-style link:

    [Annotation Techniques](Tutorial/Books/OutLine/5%20Annotation%20Techniques%20(Canvas%20&%20Markdown).md#^Test2)
    • [Annotation Techniques]: The display text for the link. Anything in [] is the DISPLAY text of the link/Anchor Link etc.

    • Tutorial/Books/OutLine/...: The relative file path to the note.

    • #^Test2: The specific anchor/block ID.

  2. This creates a clickable link that will navigate directly to the block ^Test2 inside the file.


How to Simplify This

Manually typing out such long paths can be tedious. Here are some ways to streamline the process:

A. Right-Click to Copy Correct Link

  1. Open the note containing the anchor.

  2. Right-click on the block or heading in the note (if you're using Preview Mode).

  3. Select "Copy Block Link".

  4. Paste the link into the Canvas. It will automatically follow this format:

    [Display Text](File Path.md#^block-id)

B. Use Aliases for Shorter File Names

If the file path is long, add an alias in the note's YAML frontmatter:

---
aliases: ["ShortName"]
---

You can now use:

[Annotation Techniques](ShortName.md#^Test2)

C. Use Advanced Plugins

  1. Templater Plugin:

    • Automate generating Markdown-style links to block IDs.

    • Create a template for reusable syntax:

      [Display Text](File Path.md#^block-id)
  2. Advanced URI Plugin:

    • Copy URIs directly to blocks without worrying about manual typing.


Final Thoughts

The Markdown-style linking syntax [Display Text](File Path.md#^block-id) is the most precise and reliable method for anchors in Obsidian Canvas.

----

Blocks

Last updated