JSFiddle - React, Tailwind, and code Playground
by slym12
HTML
<div>
<textarea name="Text1" onkeyup="auto_grow(this)" onChange="func()" >
User Story:
----
In preparation towards our new NEWS section we need to create a matrix to gather Hemmersbach Users we would like to reach.
Acceptance Criteria:
----
- Creation of dynamically updating groups
- Frontend to create Groups in ADM
</textarea>
</div>
<pre>
User Story:
----
In preparation towards our new NEWS section we need to create a matrix to gather Hemmersbach Users we would like to reach.
Acceptance Criteria:
----
- Creation of dynamically updating groups
- Frontend to create Groups in ADM
</pre>
CSS
textarea {
resize: none;
overflow: auto;
overflow-x: hidden;
width: 300px;
height: auto;
border: 1px blue dashed;
}
div {
width: 300px;
height: 200px;
}
JavaScript
function auto_grow(element) {
element.style.height = "auto";
element.style.height = (element.scrollHeight)+"px";
}