title: Getting the textarea value of a ckeditor textarea with javascript
body: <p>I'm a learner as far as JS goes and although I've spent a good few hours reading through tutorials which has helped lots but I'm still having problems figuring out exactly how I find out what a user is typing into a ckeditor textarea.</p>
  
  <p>What I'm trying to do is have it so that when someone types into the textarea, whatever they type appears in a div in a different part of the page.</p>
  
  <p>I've got a simple text input doing that just fine but because the text area is a ckEditor the similar code doesn't work.</p>
  
  <p>I know the answer is here: <a href="http://docs.cksource.com/FCKeditor_2.x/Developers_Guide/JavaScript_API#Retrieving_an_Editor_Instance" rel="noreferrer">ckEditor API textarea value</a> but I don't know enough to figure out what I'm meant to do. I don't suppose anyone fancies helping me out?</p>
  
  <p>The code I've got working is:</p>
  
  <pre><code>$('#CampaignTitle').bind("propertychange input", function() {
    $('#titleBar').text(this.value);
  });
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;label for="CampaignTitle"&gt;Title&lt;/label&gt;
  &lt;input name="data[Campaign][title]" type="text" id="CampaignTitle" /&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;div id="titleBar" style="max-width:960px; max-height:76px;"&gt;&lt;/div&gt;
  </code></pre>