Skip to content

[Feature Enhancement] Support custom callout icons with Iconize plugin #330

@Oddward

Description

@Oddward

Iconize is a plugin that lets you use icons in various parts of the UI including file name prefix, folder name prefix, tabs, and more recently in the note content with a simple syntax: :PrefixedIconName:. E.g.

#### :RiSparklingFill: Summary

1000049421.jpg

It supports any icon set — they're placed in an .obsidian/icons folder via the plugin settings or manually & loaded in live/rendered view — plus quick autofill suggestions with previews. It's shaping up to be the primary solution for icons in Obsidian — github link.

main problem

Admonitions requires an icon to be set in custom admonition settings, and from a limited set. It would be great if Admonitions supported other icon solutions like Iconize for the custom callout icons/title. This could be via:

  • supporting the Iconize syntax in the icon: property & then rendering in title position
icon:  :RiSparklingFill:
  • supporting syntax in the custom ad settings (maybe it can pull the svg?)

  • option to have no custom ad icon and simply placing the icon we want in the title content.

````ad-summary
title:  :RiSparklingFill:  Heading text
icon:  

It somewhat works with md titles in codeblock atm
\````

Sample using markdown heading:
1000049418.jpg

Optionally, if you go the disable icon route you could target the first icon child (svg or .cm-iconize-icon) to style it in the same way as the default icons.

I think this could greatly enhance admonitions without too much change on the plugin's end. Afaict, all that's needed is to place an icon call (:IconRef:) where the icon should be

notes

  • attachment includes a couple small bugs being investigated atm, but gives an idea
  • Iconize's symbol operator and icon name prefixes are not fixed
  • currently, the icon name in plaintext is persistent except in reading mode — see Iconize issue #315

1000049414.jpg

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions