title: Indicate word wrap in textarea
body: <p>I have textarea with rows="50" and cols="15".
  I want when it's going to wrap the words to simulate enter pressing,because I check when the user goes to new row with <strong>keydown and e.which==13</strong> ,but the word wrap prevents me to check this.
  <strong>edit</strong>:
  Because I want to try to make something like online editor ,and I dynamicly count the rows like Bespin`s(bespin.mozillalabs.com ,left) rows counting.For this counting I detect when enter is pressed and add new number,but when word wrap is on - it counts wrong ,because when the words are wrapping enter isn't pressed.</p>
  
  <p><strong>Edit 2</strong>:
  I found a script ,that does what I want ,but how to simulate enter pressing?</p>
  
  <pre><code>&lt;script language="javascript" type="text/javascript"&gt;
  var ijk = 0;
  function txt_ara()
  {
  //alert("1");
  //alert(document.getElementById("email").value.length);
  //var ijk = 0;
  //var incr = 2;
  if(document.getElementById("email").value.length &lt;= 59)
  {
  if(document.getElementById("email").value.length == 59)
  {
  document.getElementById("email").value += "\n";
  }
  }
  else
  {
  var lkm = "";
  if(ijk == 0)
  {
  lkm = parseInt(document.getElementById("email").value.length % 120);
  }
  else
  {
  lkm = parseInt(document.getElementById("email").value.length % 60);
  }
  if(lkm == 0)
  {
  ijk = 1;
  document.getElementById("email").value += "\n";
  }
  }
  }
  &lt;/script&gt;
  &lt;textarea name="email" id="email" class="txtField1" cols="60" rows="26" wrap="off" onkeyup="txt_ara();" onkeydown="txt_ara();"&gt;&lt;/textarea&gt;
  </code></pre>