marked-input
v0.1.1
Published
Mark your input box
Downloads
1
Readme
Marked Input
Make your input box markable. Mark the unexpected text in your input box.
Installation
npm i marked-input
Usage
<style>
#input > em {
background: yellow;
font-style: normal;
}
</style>
<div id="input"></div>
// Via NPM
const markedInput = require('marked-input');
// Via global, you'll get global variable `markedInput`
markedInput.init({
el: '#input',
splitText: 10, // text longer than 10 chars will be marked
onChange: text => {
console.log(`Significant text: ${text}`);
},
});