CodePen

HTML

            
              <textarea name="textarea" id="textarea" cols="75" rows="15"></textarea>
<a href="#textarea" class="add-code">Add Code</a>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              textarea {
  float: left;
  clear: left;
  margin-top: 10px;
  margin-left: 10px;
}

a {
  float: left;
  clear: left;
  margin-top: 10px;
  margin-left: 10px;  
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              (function(){ 
  $('a.add-code').on('click', function() {
      var $editItem = $("#textarea");
      var currentValue = $editItem.val();
      var newValue = currentValue + "<pre><code></code></pre>";
      $editItem.val(newValue);
  });
})();



            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................