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 it in browser? #35

Open
tamlok opened this issue Mar 21, 2017 · 4 comments
Open

How to use it in browser? #35

tamlok opened this issue Mar 21, 2017 · 4 comments

Comments

@tamlok
Copy link

tamlok commented Mar 21, 2017

Hi, could you help me with using it in browser directly? Thanks very much!

@medfreeman
Copy link
Owner

Hi,
sure.

What is your current code ?
What errors do you get ?
Did you try the example here (look for the browser example) ?

@tamlok
Copy link
Author

tamlok commented Mar 23, 2017

Thanks for your response! I am new to npm. I see other markdown-it plugins have a dist/ directory which contains the *.js file for use in browser.

I tried to use browserify to make one JS file for markdown-it-toc-and-anchor according to some examples on the Web. But it complains some errors. After struggling for a while, I turn to other plugins. :)

So I think we could release a dist/ direcotry and corresponding JS files which could be directly used in browser, for example, making it as simple as using window.markdowitTocAndAnchor.

Thanks very much!

@john-cj
Copy link

john-cj commented Jul 18, 2018

@tamlok Did you ever success in getting this to work? For some reason, the browserified version of this plugin doesn't work for me too. Another plugins, with Browserify, works fine for me (so, I know how to use Browserify).

@tamlok
Copy link
Author

tamlok commented Jul 18, 2018

@john-cj Nope! As what I said, I went for another similar project.

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

3 participants