javalent / admonitions

Adds admonition block-styled content to Obsidian.md
MIT License
1.07k stars 70 forks source link

[Feature request] Add the possibility to automatically add tags to blocks #241

Closed ultrapoci closed 1 year ago

ultrapoci commented 2 years ago

It would be quite useful if it was possible to automatically add a user defined tag to each custom admonition block. I don't think this should be visible: the plugin could simply add a comment above or below each block: %%#tag%%. This is what I already do manually, for example.

sigrunixia commented 1 year ago

@ultrapoci What would be the use case for adding a tag to the block automatically?

valentine195 commented 1 year ago

This is out of the scope of the plugin.

ultrapoci commented 1 year ago

I used custom block to highlight questions in my thesis I order to keep a reminder to answer them later. Since not every document has a question that needs answering, a tag is a good way to have a nice list of every document that has the "question" block.

sigrunixia commented 1 year ago

I used custom block to highlight questions in my thesis I order to keep a reminder to answer them later. Since not every document has a question that needs answering, a tag is a good way to have a nice list of every document that has the "question" block.

This would be better handled by having a plugin such as templater insert your custom blocks.

I imagine your issue comes from live preview around a code block which is inconsistent with how it displays markdown comments?

image

Might I suggest storing the tags inside the admonition? Search can detect the tags inside the code block, and markdown comments also work within it.