Replies: 1 comment
-
Ok rough version using .use(MarkdownItContainer, "card") // ::: card
.use(MarkdownItContainer, "grid", {
validate: function(params) {
return params.trim().match(/^grid\s+(.*)$/);
},
render: function (tokens, idx,_options, env, slf) {
// add a class to the opening tag
if (tokens[idx].nesting === 1) {
var m = tokens[idx].info.trim().match(/^grid\s+(.*)$/);
tokens[idx].attrJoin('class', 'grid ' + md.utils.escapeHtml(m[1]));
}
return slf.renderToken(tokens, idx, _options, env, slf);
}
},
{marker: '::::'}
) // ::: grid with parameters... For grid I need to use :::: for proper matching... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I can convert the card divs in the hello framework to (see attached index.md)
::: card
Can I also use that for Grids?
Specifiying the grid-cols-2 and style options?
Quarto has Callout Blocks that seem more advanced.
::: {.callout-note icon=false}
Is that also possible using the MarkdownItContainer ?
index.md
Beta Was this translation helpful? Give feedback.
All reactions