javalent / admonitions Goto Github PK
View Code? Open in Web Editor NEWAdds admonition block-styled content to Obsidian.md
License: MIT License
Adds admonition block-styled content to Obsidian.md
License: MIT License
It would be nice to have an dedicated shortcut to collapse-all/expand-all Boxes of the current note.
I know we can create a collapsible admonition but I still want a folding function for the heading and bullet list in preview mode. Then I can collapse and expand anything I need in my admonition.
My admonitions don't render after the update to 4.2.0. I get the following error in the console:
TypeError: Cannot read property 'trim' of undefined
at ObsidianAdmonition.eval (eval at <anonymous> (app.js:1), <anonymous>:9921:35)
at Generator.next (<anonymous>)
at eval (eval at <anonymous> (app.js:1), <anonymous>:31:71)
at new Promise (<anonymous>)
at __awaiter (eval at <anonymous> (app.js:1), <anonymous>:27:12)
at ObsidianAdmonition.postprocessor (eval at <anonymous> (app.js:1), <anonymous>:9899:16)
at app.js:1
at Function.t.postProcess (app.js:1)
at t.postProcess (app.js:1)
at h (app.js:1)
Attaching a screenshot for reference:
Heya! Cool plugin! I've noticed a li'l bug.
If you do this:
```ad-note
title: foo:bar
baz
```
everything after the second : gets cut off in the title. In this case 'bar' isn't visible in the preview.
(I quickly updated to 3.3.0 to check if this bug is still present. It is. But I noticed another bug after updating: In the examples in the Admonition Settings, the icons are centered and above the titles. Thankfully they render fine in the actual notes themselves.)
Hi there, is it possible to have a shortcut for a specific admonition, that basically insert the boilerplate?
Maybe with a command prompt like ad-note
‘’’ ad-note
title:
‘’’
gets inserted.
Maybe there is already a solution to insert these templates. I am happy to configure them once.
Best regards and thank for the awesome plugin. :)
Very cool plugin to upgrade files visually! Thank you. Unfortunately it's not possible to tick checkboxes inside admonition enviroment in preview.
Just a little concerned that this plugin is using two dozen code block IDs. I've been contacted by several plugin developers about this who believes that this doesn't seem like a good idea.
I understand that this is for convenience, but I would highly suggest to either prefix your code block id, or use a single code block id but have the type as a content parameter, like you already do with title
and collapse
. This would reduce the likelihood of your plugin conflicting with another, causing confusion for the user.
Let me know what you think.
First of all, huge thanks for the amazing plugin. Recently, I observe that Collapsible by Default doesn't work anymore. Maybe it is because I upgrade to v0.12.4. Do you have any idea or if you need any information, please let me know!
It would be nice to get the same colors inside the ad-note or whatsoever, that are also displayed in plain markdown.
By now, everytime an Note with an expanded Box is closed an reopened, it will display the boxes collapsed.
Would nice to have an option to disable that, so that all boxes are expanded by default.
See video in #49 for reference.
For example:
``` ad-note
This is a footnote. [^1]
`` `
How many ways can we arrange a dog, a cat, and a pig?
$$n=3$$
$$3!=3×2×1=6$$
The 2 mathjax blocks end up very widely spaced.
Hey, its me again! :)
First of all, thanks for this speed of improving!
I found some issue (i think with the newest update, because this worked properly in the last versions i guess) which shows an wrong behaviour regarding the spacing between [[Links]]
and $formula$
or $$formula$$
.. so mathjax in general.
This results to:
or without the Link and just the inline mathjax:
so the spacing is lost around these.
Hey!
I have started to use this plugin for some of the short, more 1-liner, code snippets as it looks much nicer than a code-block in a larger document. So having the ability to COPY, just the content, would be a nice addition to this plugin!
I know this was probably not an expected use case for this plugin, but having the ability to toggle on\off a copy feature on it (in it settings) for the few of us that could use it this way... would be amazing!!
://mk.
Hey,
after the latest update 5.0.1 my beloved feature isnt working anymore.
I always used the admonition without any title
```ad-ai
title:
##### Was versteht man unter [[Machine Learning]]?
Some Text
and it rendered nicely to this block without the big titlebar.
Right now, with even "Collapsible by default" not set, it appears following notification:
with the titlebar rendered:
Is it possible to set collapse: none
as default, when the option Collapsible by default
isnt activated?
If I add collapse: none
everything works fine, but than i had to edit all my blocks..
Could you make it so that all valid font awesome names work as admonitions with just black color by default - without having to add custom ones?
collapse:
does nothing if empty
Replace an admonition block in the note with the generated HTML
Should be able to use the MarkdownSectionInfo:
Hi, congrats on the plugin.
Do you think it would be possible to integrate the original markdown-extension parsing (!!!) so as to maintain compatibility with mkdocs-material ?
I'm totally incapable of working with TypeScript but the regex is here
Love the plugin - good work !
As title suggests - would be awesome to create some of my own
I mean hover previewed,Can this be fixed?
Hello,
I found some possible enhancement to the new metadata-feature.
Thks for your plugin which brings admonition block-styled content to Obsidian! (●'◡'●)
But why not use "Custom Containers" syntax instead of code-block with ad-*
I guess it's because Obsidian doesn't provide an API related to markdown custom syntax
These are some discussion about markdown extension syntax for custom containers:
It would be awesome if there is a way to get MathJax View inside the title like
```ad-note
title: $1+1=2$
Proof
I want to custom a feature in order to make collapsible as a default config. In this way I will no need to write 'collapse: open'. Is there any method to fix it ?
Just wanted to say thank you for this amazingly useful plugin!
Keep up the great work!
Here is an example of my note:
```ad-note
My code:
```xml
<tag>
example
</tag>
```
More info
```
Admonition renders properly with the code block and two paragraphs.
Admonitions renders with the first paragraph and the code block. The second paragraph renders in a separate code block.
Is there any possible solutions fot that?
Maybe same approach as with nested admonitions can fix this?
P.S. I've tried to replace ``` with <pre> and it helped, but I lost syntax highlighting and horizontal scroll, so this solution is not good enough
Hey, your plugin is absolutely stunning!
Only one thing will make it better: a diferent syntax.
Markdown links won't render, the notes remain as unlinked even thought they´re linked. Of couse this is due to obsidian codes behavior, so it will be cool if we a have a secondary render method to Admonitions so notes can be linked.
The way my note system works is based entirely in "Ad-question" Admonitions.
But, when a try to add any link inside a Admonition, the note linked remain as unlinked
It will be REALLY cool if this notes got linked!
Hello! I just want to say, this is one of my favorite and most used plugins!!! Thank you so much for building it
As i mentioned here : #42
I would like to use the boxes without the title-header-bar.
By now it is not possible to set an empty title like this:
!!! ad-info
## Test
- here is some text
--- admonition
I also encountered that the content below the Heading does not render properly.
I noticed that adding quotations in the "Admonition Type" field when creating a custom admonition type causes an issue with rendering across all notes, even if the note doesn't contain the admonition block. This happens with both double and single quotes. I haven't tested anything else.
Random test note in edit mode:
Same note when previewing:
The behavior is a bit inconsistent. Sometimes the note content will fully render.
Additionally, the console displays this error:
Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Element': 'code.language-ad-Exam"ple' is not a valid selector.
at HTMLDivElement.Element.findAll (app://obsidian.md/app.js:1:265393)
at app://obsidian.md/app.js:1:858332
at Function.t.postProcess (app://obsidian.md/app.js:1:933599)
at t.postProcess (app://obsidian.md/app.js:1:932200)
at p (app://obsidian.md/app.js:1:847881)
at e.onRender (app://obsidian.md/app.js:1:848141)
Thanks for this amazing plugin! Is it possible to add an option to remove the triangle on the left of the admonition when collapse
is enabled? I remember it wasn't there before version 4.1.0 or something. For me, the indicator on the right is more than enough. And the triangle is adding this extra layer of padding, which is a little excessive. Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.