marked-input

0.1.1 • Public • Published

Marked Input

NPM Downloads

Make your input box markable. Mark the unexpected text in your input box.

Demo

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}`);
  },
});

Snapshots

MarkedInput

/marked-input/

    Package Sidebar

    Install

    npm i marked-input

    Weekly Downloads

    1

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • gera2ld