@cpfarher/react-highlightjs
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

@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.

Package Sidebar

Install

npm i @cpfarher/react-highlightjs

Weekly Downloads

4

Version

1.0.5

License

MIT

Unpacked Size

14.3 kB

Total Files

17

Last publish

Collaborators

  • cpfarher