Closed xplosionmind closed 9 months ago
I believe that the issue I referenced was another user with the same need…
@xplosionmind you could do it using markdown-it-attrs & markdown-it-container together:
::: custom {.yellow .box}
### Hello
:::
<div class='custom yellow box'>
<h3>Hello</h3>
</div>
@rrherr That looks nice!
It’s interesting to compare markdown-it-container + markdown-it-attrs with Pandoc’s syntax for “fenced divs”:
::: single-class
:::
::: {.class1of2 .class2of2}
:::
::: {.single-class id=my-id}
:::
That is: It interprets a single name as a class name. As soon as you adds another attribute, you have to switch to attributes in braces (with markdown-it-attrs syntax).
I am referring to #23 in requesting if it is possible to add a toggle that enables/disables multiple classes as the generated
div
name. I already checked the source code, but I think it would be better not to make each user customize the code, but rather providing standard options and toggles. In my case, I lack the knowledge to directly manipulate the JavaScript of this extension.E.g.