JanGuillermo/vue3-markdown-it

How to active highlight plugin?

Opened this issue · 1 comments

I know it's a basic question but I can't figure out how to use the highlight plugin?
Where am I supposed to declare it and do I need to install something else?

Can you provide an example? Thank you!

@musixite probably way too late for this but I just came up against this same problem. Following the text in the readme, importing only a highlight js css file makes it work for me.

yarn add hightlight.js
// somewhere in javascript (I added to my app initialization file):
import 'highlight.js/styles/github-dark-dimmed.css'

then in my component file, I am simply using the Markdown component and highlighter is styled:
Screen Shot 2022-03-21 at 3 24 46 PM

i have not yet tried using the highlighter prop on the component. I am guessing thats to pass the highlight.js options listed here: https://github.com/valeriangalliat/markdown-it-highlightjs#usage