Skip to content

Button syntax and configuration

The Buttons plugin allows users to create interactive buttons within notes using specific code block syntax.^[200-學習OB__plugin__buttons.md]

Syntax

Buttons are defined by creating a code block with the language identifier button.^[200-學習OB__plugin__buttons.md]

Basic Button

A minimal button definition requires a name parameter to set the label text.

```button
name Btn
```

^[200-學習OB__plugin__buttons.md]

Buttons can be configured to act as hyperlinks. This requires setting the type to link and providing a target URL in the action parameter.^[200-學習OB__plugin__buttons.md]

Additionally, the following parameters can be used to customize the button's appearance and integration with other plugins:

  • templater: Enables integration with the Templater plugin (set to true).^[200-學習OB__plugin__buttons.md]
  • color: Sets the text color of the button (e.g., blue).^[200-學習OB__plugin__buttons.md]

Example:

```button
name github-buttons
type link
action https://github.com/shabegom/buttons
templater true
color blue
```

^[200-學習OB__plugin__buttons.md]

Sources

^[200-學習OB__plugin__buttons.md]

  • [[Obsidian]]
  • [[Templater]]