maxnegro / joplin-plugin-admonition

Joplin markdown plugin for custom containers
37 stars 4 forks source link

Add own admonition environments? #5

Open blumenschwein opened 2 years ago

blumenschwein commented 2 years ago

Is it possible to add own admonition environments? For example, I would like to create the environment "definition". Just by adding the following into the css, it does not seem to work

admonition.definition {
  border-color: #ff1744;
}

.definition .admonition-title {
  background-color: rgba(255,23,68,.1);
}
.definition .admonition-title::before {
  content: "DEF. ";
}
maxnegro commented 2 years ago

Is it possible to add own admonition environments? For example, I would like to create the environment "definition". Just by adding the following into the css, it does not seem to work

At the moment the integration does not support custom admonitions. I think this could be possible, since docarys/markdown-it-admonition does support custom types, but this has to be declared when registering the plugin.

See https://github.com/docarys/markdown-it-admonition/blob/master/index.js line 16

silopolis commented 1 year ago

That'd be awesome and would open a world of possibilities... AFAIC I came here because I'd love to be able to add types for TODOs, FIXMEs etc so they nicely appear in my notes/docs

Thank you for sharing this nice plugin

Take care J