title: Append text to div from textarea
body: <p>I am trying to make a simple editor where the user can enter text and upon hitting the edit button it will append that text to the end of the <code>id="textArea"</code>. Nothing happens when I hit the edit button after entering text in the textarea. </p>
  
  <p>If someone could point out what I'm doing wrong or a better way to do this I'd appreciate it, I have seen other ways of doing it but I'm just not sure why this way isn't working. Thanks.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;script src="https://d3js.org/d3.v3.min.js"&gt;&lt;/script&gt;
  
    &lt;script&gt;
      function edit(){
  
        var editorText = document.getElementById("editor").value;
        $("#textArea")append("editorText");
        }
    &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div&gt;
  &lt;form&gt;
    Text Editor
  &lt;br/&gt;
    &lt;textarea id="editor"&gt;
    &lt;/textarea&gt;
  &lt;br/&gt;
    &lt;input type="submit" value="Edit" onclick="edit()"&gt;
  &lt;/form&gt;
    &lt;/div&gt;
  &lt;br&gt;
  
    &lt;div id="textArea"&gt;
  
  &lt;h2&gt;&lt;a name="year1"&gt;&lt;/a&gt;Document&lt;/h2&gt;
  &lt;p&gt;
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse laoreet nisl velit, at elementum enim blandit in. Suspendisse sit amet posuere ex. Donec sit amet commodo nibh. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Etiam vitae tincidunt metus. Suspendisse ex ligula, placerat convallis varius in, placerat et ipsum. Pellentesque et neque nec nisl consectetur fringilla ut tristique ligula. Aliquam in sem turpis.
  &lt;/p&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>EDIT: After following some of the suggestions, I still had no luck. Here is the new code I am trying to use.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;script src="https://d3js.org/d3.v3.min.js"&gt;&lt;/script&gt;
  
    &lt;script&gt;
    function edit(){
   $("#editor").append("editorText");
  }
    &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div&gt;
  &lt;form&gt;
    Text Editor
  &lt;br/&gt;
    &lt;textarea id="editor"&gt;
    &lt;/textarea&gt;
  &lt;br/&gt;
    &lt;input type="button" value="Edit" onclick="edit()"&gt;
  &lt;/form&gt;
    &lt;/div&gt;
  
  &lt;br&gt;
  
    &lt;div id="textArea"&gt;
  
  &lt;h2&gt;&lt;a name="year1"&gt;&lt;/a&gt;Document&lt;/h2&gt;
  &lt;p&gt;
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse laoreet nisl velit, at elementum enim blandit in. Suspendisse sit amet posuere ex. Donec sit amet commodo nibh. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Etiam vitae tincidunt metus. Suspendisse ex ligula, placerat convallis varius in, placerat et ipsum. Pellentesque et neque nec nisl consectetur fringilla ut tristique ligula. Aliquam in sem turpis.
  &lt;/p&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>