jmadler / emoji-picker

Add a slick emoji selector to input fields and textareas on your website.
Other
1.31k stars 318 forks source link

textarea elastic #161

Open irsal-png opened 2 years ago

irsal-png commented 2 years ago

can you help me, how to make the textarea elastic from the emoji picker

jlwegaba commented 2 years ago

I had faced the same problem. so i used class in my textarea to over ride the emoji's hidden one with height: auto !important;

Also added <script> // Auto expand the Text Area as content increases $("textarea").each(function () { this.setAttribute("style", "height:" + (this.scrollHeight) + "px;overflow-y:hidden;"); }).on("input", function () { this.style.height = "auto"; this.style.height = (this.scrollHeight) + "px"; }); </script>