Skip to content

cpfarher/react-highlightjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@cpfarher/react-highlightjs

A wrapper Highlight.js component for React. I take the ideas from react-highlight.js npm package but without a lot of dependencies and following the KISS principle

Installation NPM

npm install react-highlight.js --save

Choose a highlight.js theme and make sure it's included:

import '@cpfarher/react-highlightjs/src/highlight-styles/railscasts.css';

And then use react-highlightjs to display your text like so:

import Highlight from '@cpfarher/react-highlightjs';

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

License

@cparher/react-highlightjs is available under the MIT License.

About

A wrapper React component for Highlight.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published