Sobsno is on the Input page, I want to make sure that by default it only has a placeholder, and when I enter it, I need it to track its content and, if necessary, increase / decrease its height. How to achieve this?
2 answers
You can use the usual div with contenteditable=true and display: inline-block style.
div { border: 1px solid #aaa; padding: 5px; border-radius: 3px; width: 100px; display:inline-block; } <div contenteditable=true></div> - If we are to do
contenteditable, then so , only withwhite-space: normal. - Qwertiy ♦ - @Qwertiy I don’t understand what the difference is then. Do you have
.editor *styles.editor *for cross-browser compatibility or what is it? - Sasha Omelchenko - oneIn order to avoid this: i.stack.imgur.com/nsC3d.gif - Qwertiy ♦
|
maybe in CSS
input{ height:auto; } - Yah? And check. - Qwertiy ♦
|
textarea, it is for this and created. - user207618inputcannot be done if needed -textareawill help. And so - it is unclear what the author needs. - user207618