react-liner

1.2.0 • Public • Published

react-liner

Highlight a text. Get its content:

{
  preffix: 'High',
  exact: 'light a text',
  suffix: '. Get its content:'
}

With react.

import Liner from 'react-liner'
 
function callback({prefix, suffix, exact}) {
  console.log('prefix', prefix)
  console.log('exact', exact)
  console.log('suffix', suffix)
}
 
<Liner onSelect={callback}>This is a Highlightable-Text</Liner>

Roadmap

  • Children is a plain text
  • [] Children has nested elements

Package Sidebar

Install

npm i react-liner

Weekly Downloads

2

Version

1.2.0

License

MIT

Last publish

Collaborators

  • exacs