@youyouzone/react-code-highlight
v0.0.18
Published
<p align="center"> <img src="./screenshot/profile.gif" alt=''> </p>
Downloads
12
Maintainers
Readme
React-Code-Highlight
React component for code highlight base on hightlight.js.
Installation
npm install @youyouzone/react-code-highlight
Usage
import HighLighter from '@youyouzone/react-code-highlight';
//use as a react component
<HighLighter />
Props:
- cb?: (content:string) => any - custom callback which accept input string.
- className?: string - custom class name.
- language?: string - highlight langeuage, powered by highlight.js. Default is 'javascript'.
- debounceTime?: number - debounce time of input change to invoke callback function. Default is 666 ms.
- content?: string - content in text box.
License
This project is licensed under