views:

21

answers:

1

I get a textarea with a keyup function attached. When the user type something, I want this text to be rendered inside the blockquote tag. bloquote css is set towhite-space: pre-wrap;. In this way it take into account the newline. The problem now is that bloquote doesn't care of max-height property(200px). If itype in the textarea enter key serveral times, blocquote height grows infinitely. Any help?

$('#post_body').keyup(function() {    
$('blockquote').find('span').text($(this).val());
+1  A: 

Or:

1.- you let it grow infinitely,

2.-or you put scrollbars,

3.-or you hide what is higher than a height(You can use height, and then overflow hidden)

netadictos