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]
Link Button¶
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 totrue).^[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]
Related¶
- [[Obsidian]]
- [[Templater]]