Embed base code block in another note

Use case or problem

I prefer using base code blocks directly in the note, instead of embedding base files, because I try to limit the amount of files in vault.

The disadvantage of the direct use of code blocks in the notes is - as far as I can see - that they can’t be embedded in another note.

Proposed solution

I would like to have the possibility to embed a base code block in my notes, which is written in another note.

Current workaround (optional)

It is still possible to create an extra header for that code block. Then I can embed that header incl. that base, but I would like to have the direct possibility.

Just adding another workaround. Block IDs work on base code blocks. So you can do:

```base

```
^myBase

in a note named, say “example note.md” then embed it in any note as:

![[example note#^myBase]]
2 Likes

You can let Obsidian assign or manually give a base-code-block a block identifier and then link to + embed that. e.g.

# h1 heading

some text

## h2 heading

```base
views:
  - type: table
    name: Table
    filters:
      and:
        - file.folder == "Guides"
```

^base24C

some more text, yay

## another h2 heading

and in another note where you want it embedded:

![[just a note#^base24C]]

1 Like

@dawni jinx!

1 Like