Skip to content

Block reference embedding

Block reference embedding is a functionality in digital note-taking applications—specifically the Buttons plugin for Obsidian—that allows users to embed a clickable button inline with other content^[200-ob-plugin-buttons.md]. This feature operates similarly to standard markdown link syntax or image embedding but generates an interactive UI element within the document^[200-ob-plugin-buttons.md].

Syntax and Usage

The implementation relies on a specific code block syntax labeled button^[200-ob-plugin-buttons.md]. Within this block, parameters such as the button's name and type are defined to configure its appearance and behavior^[200-ob-plugin-buttons.md].

For example, to create a button labeled "Btn", the following syntax is used^[200-ob-plugin-buttons.md]:

```button
name Btn
```

This syntax renders the defined button directly in the view mode of the note^[200-ob-plugin-buttons.md].

While the default behavior creates a standard interactive element, the plugin supports parameters that alter the button's function^[200-ob-plugin-buttons.md]. Users can configure the button to act as a link by specifying the type link attribute followed by a target URL^[200-ob-plugin-buttons.md].

The following example demonstrates a button configured to open an external GitHub repository^[200-ob-plugin-buttons.md]:

```button
name github-buttons
type link
action https://github.com/shabegom/buttons
```

Sources

^[200-ob-plugin-buttons.md]