Uncaught TypeError: Cannot read properties of undefined (reading 'utils')
at markdown-it-multimd-table.min.js:2:2805
at onload (simple.html:16:21)
at onload (simple.html:11:25)
html code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/13.0.1/markdown-it.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/markdown-it-multimd-table@4.2.2/dist/markdown-it-multimd-table.min.js" type="text/javascript"></script>
<style>
tr, td ,th {border:1px solid black}
</style>
</head>
<body onload="onload()">
<div id="app"></div>
<script>
function onload(){
console.log('onload')
var md = window.markdownit().use(markdownItMultimdTable, {
multiline: true,
rowspan: true,
headerless: false,
multibody: true,
aotolabel: true,
});
const exampleTable =
"| Grouping ||| \n" +
"|First Header | Second Header | Third Header | \n" +
"|------------ | :-----------: | -----------: | \n" +
"|Content | *Long Cell* || \n" +
"|^^| **Cell** | Cell | \n" +
" \n" +
"|New section | More | Data | \n" +
"|And more | With an escaped '\\|' || \n";
var result = md.render(exampleTable);
console.log(result)
document.getElementById("app").innerHTML = result
}
</script>
</body>
</html>
I misconfigured the minified plugin name, and this leads to a conflict. Please check out version 4.2.3 and set the plugin name as markdownitMultimdTable.
when call from html, got
html code: