Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Oddward opened this issue Jan 29, 2024 · 0 comments
Open

Comments

@Oddward
Copy link

Oddward commented Jan 29, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant