Adding multiple classes
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.
::: yellow box
### Hello
:::
<div class='yellow box'>
<h4>Hello</h4>
</div>
- Policy to leave all for customization is intended, to not poison api with zillion of rare options.
- Refer to added value for "many users" should have concrete proofs. At current moment only you requested such feature. As alternative, you could publish package with your vision of api.
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).