diff --git a/dreditor.user.js b/dreditor.user.js
index 631d996..c9b5641 100644
--- a/dreditor.user.js
+++ b/dreditor.user.js
@@ -1360,6 +1360,66 @@ Drupal.behaviors.dreditorIssueSummary = function (context) {
 };
 
 /**
+ * Adds button to insert the issue summary template.
+ */
+Drupal.behaviors.dreditorIssueAddEdit = function(context) {
+  var getPoster = function() {
+    $.get($('#tabs a:contains("View")').attr('href'), function(data) {
+        var link = $(data).find('div.node > div.submitted a');
+        var new_link = '<a href="' + link.attr('href') + '">' + link.text() + '</a>';
+        $('#edit-body').val($('#edit-body').val().replace(/\[username\]/, new_link));
+      });
+  };
+
+  var injectTemplate = function(edit_form) {
+    $.get('http://drupal.org/node/1155816', function(data) {
+      // We need the first codeblock to extract the template
+      var template = $(data).find('div.codeblock:first > code');
+      var text = template.text();
+      // Insert blank lines and strip comments.
+      text = text.replace(/<\/h3>/g, "</h3>\n\n\n").replace(/\(.*\)/g, "").replace(/\/\/.*\./,"");
+
+      // Prepend text to current body.
+      $('#edit-body').val(text + $('#edit-body').val());
+      if (edit_form){
+        getPoster();
+      }
+      else {
+        $('#edit-body').val($('#edit-body').val().replace(/<h3 id=\"summary-original-report\">.*<\/h3>/, ''));
+      }
+    });
+  };
+
+  var addTemplateButton = function(edit_form) {
+    
+    // We want to append the button in the label area.
+    var $label = $('label[for="edit-body"]');
+    // Button to inject the template
+    var $action = $('<a>')
+      .attr('href', '#')
+      .appendTo($label)
+      .text("Insert template")
+      .attr('class', 'dreditor-button')
+      .click(function() {
+        injectTemplate(edit_form);
+        return false;
+      }
+    );
+    // Make it a commandbutton.
+    $action.wrap('<span>&nbsp;&nbsp;</span>');
+  };
+
+  $('body.logged-in.page-node.node-type-project-issue #edit-body').once('dreditorIssueTemplate', function() {
+      addTemplateButton(1);
+  });
+
+  $('body.logged-in.page-node div.project-issue #edit-body').once('dreditorIssueTemplate', function() {
+    addTemplateButton(0);
+  });
+
+};
+
+/**
  * Streamline issue comment form.
  *
  * Altering of the form makes certain browsers (such as Firefox) no longer find
