Skip to content

jasperfirecai2/react-highlight.js

 
 

Repository files navigation

Demo

See the demo here.

Installation

Install react-highlight.js using NPM:

npm install react-highlight.js --save

Choose 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 react-highlight.js to display your text like so:

import Highlight from 'react-highlight.js';

<Highlight language={language}>
  {content}
</Highlight>

License

react-highlight.js is available under the MIT License.

About

A simple React wrapper around the Highlight.js library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 94.9%
  • HTML 3.9%
  • CSS 1.2%