Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

How to active highlight plugin? #183

Open
vincentcordel opened this issue May 10, 2021 · 1 comment
Open

How to active highlight plugin? #183

vincentcordel opened this issue May 10, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@vincentcordel
Copy link

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!

@vincentcordel vincentcordel added the bug Something isn't working label May 10, 2021
@pscheffer
Copy link

@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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants