title: How does the inline editing and formatting used in code.google.com works?
body: <p>Recently code.google.com added the feature to edit a file and syntax highlight it!</p>
  
  <p><img src="https://i.stack.imgur.com/J3nu5.png" alt="like this"></p>
  
  <p>From what I can understand they added a textarea along with at iframe, where the textarea is where you type in content and the iframe displays the formatting.  The textarea is moved up ( like -10000 px or something ) so it is invisible. </p>
  
  <p>What I don't get is how they manage to have the iframe content behaving like a textarea. For instance if you copy and paste a bunch of code they format it immediately.</p>
  
  <p>This is very interesting. Can anyone explain a bit on how does this works?    </p>