title: How does iframe . contentWindow . document . execCommand work?
body: <p>im trying to find out how this text editor work, iv been scanning through the script and can't seem to understand it.</p>
  
  <p><a href="http://batiste.dosimple.ch/blog/posts/2007-09-11-1/rich-text-editor-jquery.html" rel="nofollow">first this is the link for the demo</a></p>
  
  <p>what i can't understand is when you click the bold button which triggers this </p>
  
  <pre><code> $('.bold', tb).click(function(){ formatText(iframe, 'bold');return false; });
  </code></pre>
  
  <p>and then it gets send to the formatText function, and thats where i get lost, becuase thiers no mention of adding <code>&lt;strong&gt;&lt;/strong&gt;</code> tags to the text in the textarea, im really curious to know how it works, thanks.</p>