@myspace-nu/fancyinput

0.9.0 • Public • Published

fancyInput

A html text input replacement with text formatting

GitHub Code size Issues

Usage

<input type="text" class="form-control" />

<script src="../js/fancyinput.js"></script>
<script>
	let myFancyInput = new fancyInput("input");
</script>

Options

allowLineBreaks - Allow line breaks

allowLineBreaks: true

Default: false

className - Class name of the fancyinput element

className: "some-classname"

Default: "fancyinput"

classNameFocus - Class name of the fancyinput element focus state

classNameFocus: "some-classname"

Default: "focus"

copyComputedStyle - Copy computed style from the source input element

copyComputedStyle: false

Default: true

copyStyle - Copy style from the source input element

copyStyle: false

Default: true

onChange(value, evt, elm) - Event that fires when the input value changes. Used for sanatizing html and should return the sanatized html.

Author: Johan Johansson

Package Sidebar

Install

npm i @myspace-nu/fancyinput

Weekly Downloads

1

Version

0.9.0

License

MIT

Unpacked Size

11.3 kB

Total Files

8

Last publish

Collaborators

  • myspace-nu