An open API service indexing awesome lists of open source software.

https://github.com/gera2ld/marked-input

Marked input box
https://github.com/gera2ld/marked-input

Last synced: about 1 year ago
JSON representation

Marked input box

Awesome Lists containing this project

README

          

Marked Input
===
![NPM](https://img.shields.io/npm/v/marked-input.svg)
![Downloads](https://img.shields.io/npm/dt/marked-input.svg)

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

[Demo](https://gera2ld.github.io/marked-input/)

Installation
---
``` sh
npm i marked-input
```

Usage
---
``` html

#input > em {
background: yellow;
font-style: normal;
}


```

``` js
// 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](snapshots/1.png)