javascript - Adding space to the bottom of textarea -
javascript - Adding space to the bottom of textarea -
can't seem find decent way of doing this. editor total screen editor, not normal textarea. total screen editing , issue is, currently, 1 time reach end of page always typing @ bottom of browser window unless press come in bunch of times.
i thinking adding bunch of \n\n\n\n\n
bottom of textarea there (if erase them , start typing 1 time again pops them in), wasn't sure how that'd work or best way implement that. ideas?
my best thought was, check if lastly n
characters of textarea value equal deemed buffer, i.e. 6 \n
s doing little regex. if not equal, it'd add together bottom , scroll bottom (making padding).
using javascript , jquery (1.6, .prop()
examples, not .attr()
!)
here's screenshot scrolled downwards (no padding):
==update== problem padding editor seen not total screen , looks strange:
the solution think needs go modifying actual text on fly... maybe
try applying padding css bottom of textarea
.editor { padding-bottom: 60px; //or equivalent of 6 lines }
javascript jquery user-interface textarea
Comments
Post a Comment