Closed RootofalleviI closed 1 year ago
Not at the moment unfortunately - at least not without a tonne of customisation code like overriding the render()
function.
<head>
<script defer src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<script type="module">
import { ZeroMd } from 'https://cdn.jsdelivr.net/gh/zerodevx/zero-md@2/dist/zero-md.min.js'
class ZeroMdCustom extends ZeroMD {
constructor() {
super()
}
async render(opts = {}) {
await this.waitForReady()
const styles = await this.stampStyles(this.buildStyles())
await this.tick()
const md = await this.buildMd(opts)
// Apply MathJax parsing onto HTML string
// ...
const body = await this.stampBody(md, opts)
this.fire('zero-md-rendered', { node: this, stamped: { styles, body } })
}
}
customElements.define('zero-md', ZeroMdCustom)
</script>
</head>
<body>
<zero-md src="fixture.md"></zero-md>
</body>
Thanks!
As title.