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

In the nuxt.js, highlight and math do not take effect, what should I do? #25

Closed
BobSongCN opened this issue Jan 18, 2021 · 5 comments
Closed

Comments

@BobSongCN
Copy link

In the nuxt.js, highlight and math do not take effect, what should I do?

`

<script> import {Editor, Viewer} from '@bytemd/vue'; import gfm from '@bytemd/plugin-gfm'; import highlight from '@bytemd/plugin-highlight-ssr'; import mermaid from '@bytemd/plugin-mermaid'; import math from '@bytemd/plugin-math-ssr'; import footnotes from '@bytemd/plugin-footnotes'; export default { name: "drafts", components: {Editor}, data() { return { value: '' }; }, computed: { enabledPlugins() { return [ gfm(), highlight(), mermaid(), math(), footnotes() ]; }, }, methods: { handleChange(v) { this.value = v; }, }, }; </script>

`

@pd4d10
Copy link
Owner

pd4d10 commented Jan 18, 2021

Thanks for the report!

Could you please provide a reproduction case, for example, https://codesandbox.io/ ?

@BobSongCN
Copy link
Author

Thanks for the report!

Could you please provide a reproduction case, for example, https://codesandbox.io/ ?

https://codesandbox.io/s/purple-platform-orctn?file=/pages/index.vue

@pd4d10
Copy link
Owner

pd4d10 commented Jan 18, 2021

Seems like a CSS problem. Could you please add these lines as follows and check if it works as expected?

import 'highlight.js/styles/vs.css';
import 'katex/dist/katex.css';

@BobSongCN
Copy link
Author

Seems like a CSS problem. Could you please add these lines as follows and check if it works as expected?

import 'highlight.js/styles/vs.css';
import 'katex/dist/katex.css';

thx, this is indeed the reason

@pd4d10 pd4d10 closed this as completed Feb 16, 2021
@zhong1998
Copy link

how to using bytemd/vue with nuxt2

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