Admonition plugin

It works, thanks!

[[Internal links]] don’t seem to work inside this plugin. Or better, they work but are not updated. Can someone confirms this?

TIA

Yeah, this is an unfortunate side effect of the plugin being a code block processor. Links and tags are not added to Obsidian’s cache, so Obsidian won’t update or track them.

The current workaround is to use a non-codeblock syntax admonition if you require this functionality.

1 Like

Hi! Thanks for the plugin. How can I change the gray background color?

The admonition background color is set to the —background-secondary CSS theme variable here. You can change the color by overriding that line.

1 Like

Hello! I’m just wondering why if I add “tag” inside of admonition then the note is not searchable?

@Teo_IDT see this entry: Admonition plugin - #63 by valentine.195

1 Like

Hello, After my last Admonition update, default titles started to appear even if I leave title: blank.

Also the new settings do not appear in the Settings plugin.

Thanks for letting me know - I’ll get a fix out for the title issue ASAP once I can get back on my computer.

Could you explain what you mean by settings?

In your last Changelog you mention that it is now possible to default to “no title”.
Because of the code bellow, I assumed there should be a new setting for it in the Settings plugin.

        new Setting(settingDiv)
            .setName(t("No Admonition Title by Default"))
            .setDesc(
                createFragment((e) => {
                    e.createSpan({
                        text: t("The admonition will have no title unless ")
                    });
                    e.createEl("code", { text: "title" });
                    e.createSpan({ text: t(" is explicitly provided.") });
                })
            )
            .addToggle((t) => {
                t.setValue(this.noTitle).onChange((v) => (this.noTitle = v));
            });

This is the lower part of what I see:

Ah. That setting is per type - should be visible if you edit or create an admonition. There is not a global toggle.

OH, OK great. I created an admonition and all is good on that front. I could see the toggle.
Many thanks,

Hi

Thanks for your plugin !

Is it possible to insert an image in a non-codeblock syntax admonition ?

Thanks

When I have this code :

``````ad-anki-in 
title: Quels sont les types de bornages ??
A: Il y en a deux :
- Le bornage amiable.
- Le bornage judiciaire.
ID: 1642111149731
\``````

It displays like this :

“ID: 16421111…” is on the wrong line.

Is it normal ?

Thanks for your work.

Try adding a new line between the list and the ID line.

It looks like this one my phone, for reference:

Yes but the problem is anki plugin remove the blank line everytime I sync…

Ok I achieve to do what I want :slight_smile:

Sync with anki works fine and I can even use image :smiley:

Is it possible to customize the built in admonition types? I don’t use ‘bug’ or ‘warning’ or ‘danger’ -
should I just ignore these or to keep things cleaner is it possible to change the name and icon?

I would also like to change the icon of some of those I would use, such as ‘note’ and ‘abstract’. Doable?

Yep, you can override the defaults by creating them as custom types in settings.

1 Like

Well, that’s simple. :slight_smile: Thanks, Jeremy! ( @valentine.195 )

The last question - is it possible to give the admonitions a unique font style if I’ve added one to my theme’s CSS?
It would be nice to make them stand out a bit from the rest of the text of the page.