Closed lzcxfz closed 2 years ago
The branch for v2 has examples.
"@highlightjs/vue-plugin": "^1.0.2",
"highlight.js": "^10.7.3",
import hljsVuePlugin from '@highlightjs/vue-plugin'
import hljs from 'highlight.js/lib/core'
import javascript from 'highlight.js/lib/languages/javascript'
import 'highlight.js/styles/a11y-dark.css'
hljs.registerLanguage('javascript', javascript)
Vue.use(hljsVuePlugin)
<highlightjs language="javascript" :code="code" />
Thanks! Link to 1-stable branch is in the README.
Thanks! Link to 1-stable branch is in the README.
sorry, I didn't pay attention to the branch.
can you post an example of vue2?