markdown-it-mathjax3
markdown-it-mathjax3 copied to clipboard
How to use in browser?
How to use in browser?
Can you please compile and have a bin file where js can be downloaded and used in browser?
A little late but i just made the KaTeX variant of this project (it forks from that version) in my own project. It's part of a markdown project but fairly contained so it might be useful to you.
Clone this repo https://github.com/markg85/static-hedgedoc and pull out the js/marks-plugins folder in your own project.
Fix the paths if needed.
Then it's just as simple as:
import markdownIt from 'markdown-it'
import { KaTeX } from 'marks-plugins'
const md = markdownIt().use(KaTeX)
Do look at my demo html code to get these paths and js in order.
What this does is essentially the latest KaTeX version wrapped in this markdown-it-katex plugin but tweaked to be modern javascript. It's just a quick couple hour hack to get it working. If there's bugs, let me know! But it should be enough to get you started.
Sorry for the late response. Please use https://esm.sh/markdown-it-mathjax3 for example.
Sorry for the late response. Please use https://esm.sh/markdown-it-mathjax3 for example.
Why?
What i mean by that is, why do you refer to a link outside your own repository? I get it from the point of using it and using a CDN, sure. That would be a usage example of this library.
What i don't get is why an author of a library doesn't even distribute said library on it's own project page and instead refers to a CDN? It makes no sense to me. I suppose i'm of the older developer category that wants to have js/css/html files all on one server and because of that wants to have these libraries as downloads to put them there.
Just my amazement, no need to actually reply though i'd appreciate it.