Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use in browser? #65

Open
lfmunoz opened this issue Sep 16, 2023 · 1 comment
Open

How to use in browser? #65

lfmunoz opened this issue Sep 16, 2023 · 1 comment

Comments

@lfmunoz
Copy link

lfmunoz commented Sep 16, 2023

How to use in browser?

Can you please compile and have a bin file where js can be downloaded and used in browser?

@markg85
Copy link

markg85 commented Oct 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants