react-highlight.js
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/react-highlight.js package

1.0.7 • Public • Published

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:

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

License

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

Package Sidebar

Install

npm i react-highlight.js

Weekly Downloads

10,092

Version

1.0.7

License

MIT

Last publish

Collaborators

  • brianvaughn