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 request - add Admonitions/Callouts #1287

Open
spidzi opened this issue Sep 15, 2023 · 2 comments
Open

Feature request - add Admonitions/Callouts #1287

spidzi opened this issue Sep 15, 2023 · 2 comments

Comments

@spidzi
Copy link

spidzi commented Sep 15, 2023

Is your feature request related to a problem? Please describe.

I would like to see something similar to Obsidian Callouts (aka Admonitions) - text blocks with colored background for short additional info (info/note, warning, example,...).
It is a very standard element in wiki-like documentation and it would help a lot to "to include additional content without breaking the flow of your notes".

Describe the solution you'd like

Examples:

Basic functionality:

  • several basic types (note, warning, example,...)
  • render as block with colored background (different for each type)
  • icon or text identifying the type

First version does not need to have all the bells and whistles like folding and nesting.

Describe alternatives you've considered

Custom CSS and HTML? Not nice.
Quote markdown element. Not systematic.

Screenshots or Videos

admonition-gitlab
admonition-obsidian

@riccardoferretti
Copy link
Collaborator

I am not against adding it into Foam for a coherent experience, even if strictly speaking I wouldn't say this falls within Foam's scope, but more within a VS Code plugin that enhances the markdown preview.

Happy to take in thoughts and feedback

@riccardoferretti
Copy link
Collaborator

As a reference, markdown-it already has a plugin that supports admonitions, although these use a different syntax:

https://github.com/commenthol/markdown-it-admon

This is one of the reasons why I am hesitant in having this in Foam itself, as there are several flavors and opinions on md syntax. Foam is focused on the networked aspect of the knowledge base, and tries to be as little opinionated as possible about the rest.

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

2 participants