title: How to add bullet point in a textarea?
body: <p>I want to add a bullet point when i click 'enter' button inside textarea. Here is the coding. It did not function at all. Am i wrong?</p>
  
  <pre><code>&lt;script&gt;
  $(".todolist").focus(function() {
      if(document.getElementById('todolist').value === ''){
          document.getElementById('todolist').value +='• ';
      }
  });
  
  $(".todolist").keyup(function(event){
  var keycode = (event.keyCode ? event.keyCode : event.which);
  if(keycode == '13')
  {
      document.getElementById('todolist').value +='• ';
  }
  var txtval = document.getElementById('todolist').value;
  if(txtval.substr(txtval.length - 1) == '\n')
  {
      document.getElementById('todolist').value = txtval.substring(0,txtval.length - 1);
      }
  });
  &lt;/script&gt;
  
  
  &lt;form&gt;
  &lt;textarea id="todolist" class="todolist" name="todolist" rows="10"   placeholder="Maintain your pending tasks"&gt;&lt;/textarea&gt;
  &lt;/form&gt;
  </code></pre>