0.9.0 • Published 1 year 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: 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
0.9.0
1 year ago