javalent / admonitions

Adds admonition block-styled content to Obsidian.md
MIT License
1.04k stars 67 forks source link

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

Open Oddward opened 5 months ago

Oddward commented 5 months ago

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:

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


Sample using markdown heading:
![1000049418.jpg](https://github.com/javalent/admonitions/assets/22635314/f5842c2c-a171-45ab-b1ba-d1ea82b9028e)

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](https://github.com/FlorianWoelki/obsidian-iconize/issues/315)

![1000049414.jpg](https://github.com/javalent/admonitions/assets/22635314/3d632c10-44d6-43e0-a5a8-93c5b9470f5c)