Callout Toggles

approved

by Aly Thobani

Quickly add, change, or remove callouts in your notes.

β˜… 18 stars↓ 3,795 downloadsUpdated 3mo agoGPL-3.0
View on GitHub

Callout Toggles

Obsidian logo badge Number of downloads badge

An Obsidian plugin to quickly add, switch, or remove callout blocks in your notes with convenient commands. Provides a separate command for every callout type, so you can easily assign hotkeys for your favorite callouts.

Switching between callout types demonstration

Features

  • Without leaving your keyboard:
    • Insert a fresh (blank) callout, or turn existing text into a callout
    • Remove a callout, turning it back into regular text
    • Switch the type of an existing callout
  • Retain custom titles when wrapping or removing callouts
  • Works with your custom callout types (automatically syncs with Callout Manager if installed)
  • Settings for formatting, auto-selection, foldable callouts, and more

Table of contents

  1. Features
  2. Table of contents
  3. Commands provided
    1. Wrap lines in ... callout
    2. Remove callout from selected lines
  4. Usage examples
    1. Inserting a fresh callout
    2. Wrapping the current line
    3. Wrapping multiple lines
    4. Removing a callout
    5. Retaining custom titles
  5. Custom callouts (Callout Manager)
  6. Feedback
  7. Appreciation

Commands provided

Two types of commands are provided: Wrap lines in ... callout (where ... is a callout type) and Remove callout from selected lines. Using them together, you can easily switch the type of an existing callout.

[!TIP] Both commands work on full lines of text, so your cursor position within a given line doesn't matter. As long as part of a line is selected, the entire line will be included.

Wrap lines in ... callout

One Wrap lines in ... callout command is provided for every possible callout type (❞ Quote, ⚠ Warning, πŸ”₯ Tip, 🐞 Bug, πŸ“ Note, etc.), so that you can assign separate hotkeys for each of your favorite callouts. This can be used both for inserting fresh callouts, and for turning existing text into callouts.

Remove callout from selected lines

[!IMPORTANT] Note that a callout must begin on the first selected line of text for this command to be available.

This will remove the callout syntax from the selected lines, turning the callout back into regular text. If a custom title is present, it will be retained as a Markdown heading (see Retaining custom titles).

Usage examples

Inserting a fresh callout

To insert a fresh callout of your choice, simply run Wrap lines in ... callout on a blank line:

Inserting a fresh callout

Wrapping the current line

If the current line is not blank and nothing is selected, the current line will be turned into a callout:

Wrapping the current line in a callout

Wrapping multiple lines

To turn multiple lines of text into a callout, first select the lines, and then run Wrap lines in ... callout:

Wrapping multiple lines in a callout

Removing a callout

To turn a callout back into regular text, run Remove callout from selected lines with the given lines selected (make sure the callout header is on the first selected line):

Unwrapping a callout block

Retaining custom titles

If a callout has a default title (e.g. > [!quote] Quote), the entire header line will be removed when calling Remove callout from selected lines. But if a custom title is present (e.g. > [!quote] Aristotle), it will be retained as a Markdown heading, so that you don't lose your hard work in choosing that title.

Likewise, if you call Wrap lines in ... callout on a selection whose first line is a Markdown heading, the heading will be used as the custom title for the new callout block. This makes it easy to switch between callout types while retaining your custom titles, by calling Remove and then Wrap:

Retaining custom titles while switching between callout types

Custom callouts (Callout Manager)

This plugin automatically integrates with the Callout Manager plugin, if you have it installed. This means that even your custom callout types get their own Wrap commands.

If you don't have Callout Manager installed, no worries, this plugin will still work as expected. A default set of callout types will be available for you to use.

Feedback

If you have any feedback or suggestions, feel free to open an issue and I'd be happy to take a look when I can; although my availability may be limited.

Appreciation

Thanks to the creators of Obsidian, seriously an awesome note-taking app! And big thanks to eth-p for providing a Callout Manager APIβ€”super cool and very useful here.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.