All Projects → bvaughn → react-highlight.js

bvaughn / react-highlight.js

Licence: MIT license
A simple React wrapper around the Highlight.js library

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].