1.0.6 • Published 7 years ago
mc-react-highlight.js v1.0.6
Note
This has been copied from https://github.com/akiran/react-highlight
and modified to suit my needs. I do not claim any ownership of the
code other than what I have changed for my personal needs.
Demo
See the demo here.
Installation
Install mc-react-highlight.js using NPM:
npm install mc-react-highlight.js --save
Choose a mc-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 mc-react-highlight.js to display your text like so:
<Highlight language={language}>
{content}
</Highlight>
License
mc-react-highlight.js is available under the MIT License.