title: get contents of iframe on keyup
body: <p>i've seen tons of posts on this but none work for some reason. </p>
  
  <p>What I'm interested in is putting the stuff I type into a <em>contenteditable</em> <code>&lt;iframe&gt;</code> into a <code>&lt;textarea&gt;</code> and <code>&lt;div&gt;</code>.</p>
  
  <p>here's my HTML:</p>
  
  <pre><code>&lt;textarea &gt;&lt;/textarea&gt;
  &lt;iframe&gt;&lt;/iframe&gt;
  &lt;div&gt;&lt;/div&gt;
  </code></pre>
  
  <p>here's my JS:</p>
  
  <pre><code>var iframeBody=$('iframe').contents().find('body');
  iframeBody.attr('contenteditable', true);
  
  $(document.body).on( 'keyup', iframeBody, function() {   
    var txt = $(this).html();
    $('div').html(txt);
    $('textarea').val(txt);
  });
  </code></pre>
  
  <p>​
  here's the JSfiddle if you'd like to make a suggestion: <a href="http://jsfiddle.net/nyPAM/21/" rel="nofollow">http://jsfiddle.net/nyPAM/21/</a></p>
  
  <p>any help would be greatly appreciated, this thing is driving me nuts,</p>
  
  <p>thanks,
  tim</p>