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

plugin.apply is not a function #7

Open
dessalines opened this issue Sep 18, 2021 · 2 comments
Open

plugin.apply is not a function #7

dessalines opened this issue Sep 18, 2021 · 2 comments

Comments

@dessalines
Copy link

When trying to use this as a proper es6 module, IE import markdown_it_html5_media from "markdown-it-html5-media";, I get the following error:

/home/xxx/git/lemmy-ui/node_modules/markdown-it/lib/index.js:497
  plugin.apply(plugin, args);
         ^

TypeError: plugin.apply is not a function
    at MarkdownIt.use (/home/xxx/git/lemmy-ui/node_modules/markdown-it/lib/index.js:497:10)
@dessalines dessalines changed the title plugin.apply if not a function plugin.apply is not a function Sep 18, 2021
@1618employment
Copy link

same! great support...don't use markdown-it, run away!

@eatyourgreens
Copy link

I'm not sure if there is a default export, but named exports should work:

import { html5Media } from 'markdown-it-html5-media');
md.use(html5Media);

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