Package Exports
- react-mark.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-mark.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React Mark JS (Inspired by mark.js)
Marking a String
import Mark from 'react-mark.js'
// OR
import {Mark} from 'react-mark.js/dist/components/Mark'
const MyComponents = () => {
return (
<Mark
mark="o"
type="mark"
>
Hello World
</Mark>
)
}
Marking a Regular Expression (RegEx)
import Mark from 'react-mark.js'
// OR
import {Mark} from 'react-mark.js/dist/components/Mark'
const MyComponents = () => {
return (
<Mark
mark={/l/}
type="markRegExp"
>
Hello World
</Mark>
)
}Marking a Range
import Mark from 'react-mark.js'
// OR
import {Mark} from 'react-mark.js/dist/components/Mark'
const MyComponents = () => {
return (
<Mark
mark={[
{
length: 3,
start: 1
},
{
length: 4,
start: 6
}
]}
type="markRanges"
>
0123456789
</Mark>
)
}