javascript - Textarea height based on placeholder -
i'm trying solve problem textarea height if placeholder showing. text resizing i'm using: monospaced/angular-elastic works fine.
my problem placeholders:
- multi-line placeholder
- one-lineplaceholder - should 1 line, not 2
is possible adjust height of placeholder based on placeholder's height?
textarea { min-height: 18px; display: block; color: #4b565c; word-wrap: break-word; resize: none; overflow: hidden; width: 100%; padding: 0; border: 0; display: block; line-height: 1.4; } html:
<textarea msd-elastic ng-model="ng.model" ng-trim="false" ng-focus="ng.fnfocus()" ng-blur="ng.fnblur()" ng-paste="ng.fnpaste($event)" ng-change="ng.fnchange()" placeholder="ng.placeholdertext"> </textarea>
Comments
Post a Comment