@episodeyang/react-highlight.js
v1.0.3
Published
A lightweight React wrapper around the Highlight.js syntaxt highlighting library
Downloads
10
Maintainers
Readme
Demo
See the demo here.
Installation
Install @episodeyang/react-highlight.js using NPM:
npm install @episodeyang/react-highlight.js --saveChoose a highlight.js theme and make sure it's included in your index file.
<link rel='stylesheet' href='https://highlightjs.org/static/demo/styles/railscasts.css'/>And then use @episodeyang/react-highlight.js to display your text like so:
<Highlight language={language}>
{content}
</Highlight>License
@episodeyang/react-highlight.js is available under the MIT License.
