Admonition plugin

I get around this simply by

> āš  Note to self
> If apply the Suchman's ideas to Agile and Waterfall, it's more like do we use planning models.
> 
> If we use planning model, then responding to change, means plans 

It will show up as

image

Which is good enough for me

8 Likes

Iā€™d love to have such a plugin in Obsidian! Itā€™s like awesomebox in LaTeX

1 Like

Any news on that?

Good idea!!!

Thumbs up for a plugin like this!

I would also love to see an Admonition plugin coming to life :blush: !

Here are other examples, in case one of the experts have to time to take a look at this :blush: :crossed_fingers: :

Somehow, I thought this could be achievable solely from CSS, like the Kanban boards in the wonderful Spectrum community theme :thinking: ā€¦ But, as my CSS is really rusty, I probably wonā€™t be able to help there :innocent: .

2 Likes

Decided to take a stab at this. Check it out here:

The admonitions are basically a direct copy of the ones from the Material for MkDocs above, but I show the css to modify them if you want to customize the look.

I just wrote this plugin and didnā€™t do too much testing, so I wouldnā€™t be surprised if it could be buggy, but it is a pretty simple one so hopefully it works well.

Edit: I also havenā€™t submitted it to the community list yet - you have to manually download it from the Releases section on the repository.

13 Likes

Yeah, it could be achieved through Styling, since that what it boils down to. The user just needs to write HTML Markup instead of Markdown. I actually want to include something like that in the theme!

1 Like

This is really cool! I might even adjust it to fit with Spectrum. :blush:

3 Likes

Hey, thanks. I just released 0.0.5 that allows the admonition to be collapsible.

Iā€™ll probably submit it to the community plugin list soon!

4 Likes

Sounds awesome!
What kind of versioning do you use?

Once itā€™s submitted as a community plugin, Iā€™ll go to 1.0.0 and then use typical semantic versioning from there, but honestly sometimes I donā€™t follow it well (like this release should have been a minor version update).

3 Likes

Very nice indeed. Tried it out and look forward for using it
Thanks @valentine.195

I am still using 0.0.4 until it is available on the Community Plugins, but I just noticed this. Could this be fixed somehow? The breaks donā€™t work. I know that it is because it gets turned into a <p> tag. So either each line has a new <p> tag, add <br /> or leave it as <pre> ? Just some suggestions.

1 Like

0.2.0 Release

  • Uses Obsidianā€™s Markdown renderer to render the admonition content, instead of just placing it all inside a <p> tag.
  • Removed requirement to use the content: flags if title: or collapse: is used

This should fix that issue. The content should render exactly like regular markdown outside of code blocks.

The only thing I could find that gives the admonition block fits is nested code ā€“ if its the last thing in the block it will render fine (and even do the prism highlighting), but if thereā€™s content after it, that content will be placed outside the block.

image

2 Likes

Please also regard the Pandoc fenced divs and pandoc-latex-admonition a possibility.

I have been using these with Pandoc and LaTeX in times before Obsidian ā€¦

Hi there! Your plugin is a great shot, yet Iā€™m struggling with customizing default titles for each text block. For example, Iā€™d like not to rename ā€œNoteā€ every time with the ā€œcontent:ā€ row but to give it another default title. Any suggestions?

In version 0.2.0 I removed the requirement to have the content: parameter if you have a unique title, which helps.

Right now, there isnā€™t the ability to do custom default titles, but I was planning on adding it. This is a little tricky because the plugin is telling Obsidian to treat each admonition type as a code block language (like javascript or mermaid), so it could collide with other languages and exhibit weird behavior.

2 Likes

The plugin is now part of the community list, so if you have it installed, please re-install it from there.

Thanks!

5 Likes

A really great plugin! Changeable titles possibly with customizable images would make it perfect.

Thanks for this!