Creating callouts from toolbars - chrisgurney/obsidian-note-toolbar GitHub Wiki

Use Copy as callout to convert toolbars to Note Toolbar Callouts for use within the body of your own notes, or for sharing your toolbars with other users.

How it works

Right-click on a toolbar to see the export option, or use the export icon in the toolbar’s settings, just above the item list, and markdown will be copied to the clipboard.

What's supported

Features that are supported in callouts are shown below. Read more about Note Toolbar Callouts for the markdown used, or give it a try and paste one into your note.

Item Type or Component Supported in Callouts? Notes
Breaks βœ… Becomes <br/>.
Commands βœ…
Files/Folders βœ… Links to folders are preserved if the item links to an existing folder in your vault; otherwise an internal link is output.
Icons βœ…* Icons are added to callouts by default, but can only be seen in your notes if the Iconize β†— plugin is installed and enabled in your vault. Note that this requires that the Iconize setting lucide-icons (Li) is set to Native, to ensure it's using the same version of the icon library that Obsidian (and Note Toolbar).
If you would prefer not to use icons, you can disable this in settings; tooltips will be used as a fallback, if the label is empty. Other users can import icons from callouts into toolbars, even if they don't have Iconize installed.
Item Groups βœ…
Labels βœ… Tooltips are output as a fallback, if: (1) labels aren't set and (2) there are no icons, or if there are, but the Iconize β†— plugin is not enabled.
Menus βœ… By default, callouts use the ID of the menu's toolbar, so that menus continue to work if the toolbar's renamed. In settings you can choose to use the menu's name instead, which would help other users if you choose to share your callout with them.
Name βœ…
Position ❌
Separators βœ… Becomes <hr/>.
Scripts βœ…* Scripts are supported when sharing, copying as callout, and when importing callouts with script items. Callouts can execute scripts. Expressions used in labels, tooltips, and URIs are not resolved and are left as-is, shown in a variable (e.g., {{dv: ... }}) notation.
Styles βœ…* Custom styles are not included.
Tooltips ❌* Callouts can't use tooltips. They're output as comments, which serves as a reference, but also allows tooltips to be imported as part of the callout.
URIs βœ…
Variables ❌* Callouts can't use variables, so they're replaced with values from the current note by default. For sharing, in settings you can choose to keep variables as-is.
Visibility ❌ Not supported.

Notes:

  • Items without anything to output (i.e., no label or tooltip, and icons are not available) are replaced with a placeholder (e.g., β€œItem5”).
  • Certain characters are automatically escaped or encoded, if there’s a potential for them to break markdown links. For example, ] will become \].
  • Data elements are used by default to support menus, commands, and folders. This is due to URIs not working in notes that are opened in a new window, allowing these callouts to be used in more contexts.
    • In settings, you can turn data elements off and URIs will be used instead, resulting in cleaner-looking markdown.

Settings

Several settings, under the Save as callout section, let you customize the output, and optimize callouts for sharing with other users:

  • Include icons: Adds icon placeholders to callouts. Example: :LiHome:
    • The Iconize β†— plugin must be installed and enabled to see icons. If disabled, tooltips will be used if labels are not set.
    • Enabled by default; leave ON for sharing, as icons can be imported by other users.
  • Replace variables: Any variables used in the toolbar will be replaced with values from the note you're currently viewing. Example: {{note_title}} β†’ My Note.
    • Enabled by default; turn OFF for sharing if you think the recipient will use variables.
  • Use IDs in menu items: This ensures menu items still work for you if the menu toolbar's renamed.
    • If disabled, the toolbar's name will be used instead.
    • Enabled by default; turn OFF for sharing.
  • Use data elements: Data elements allow toolbars opened in new windows to still work.
    • If disabled, Note Toolbar URIs will be used instead of data elements, and also provide cleaner-looking markdown.
    • Enabled by default; leave ON for sharing.

⚠️ **GitHub.com Fallback** ⚠️