0.9.0 • Published 3 years ago
@myspace-nu/fancyinput v0.9.0
fancyInput
A html text input replacement with text formatting
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: trueDefault: 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: falseDefault: true
copyStyle - Copy style from the source input element
copyStyle: falseDefault: 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
0.9.0
3 years ago