title: Change text direction in iframe dynamically
body: <p>I want to be able to change text direction, per line, inside iframe's document.<br>
  Like in Gmail compose mail textbox.<br>
  (By the way how Gmail accomplish that?) </p>
  
  <p>For now I define this:</p>
  
  <pre><code>iframe's outerHTML =
      "&lt;!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'&gt;" +
      "&lt;html xmlns='http://www.w3.org/1999/xhtml'&gt;" +
      "&lt;head&gt;" + meta +
      "&lt;title&gt;Design Editor Frame&lt;/title&gt;" +
      "&lt;style type='text/css'&gt;" +
      "body {background-color:White;}*{cursor:text;}p {margin:0;}" +
      "&lt;/style&gt;" +
      "&lt;/head&gt;" +
      "&lt;body&gt;&lt;/body&gt;" +
      "&lt;/html&gt;";
  
  designMode ="on"
  </code></pre>
  
  <p><strong>Update:</strong></p>
  
  <p>Maybe I do can something like this, intercept 'Enter' keypress in iframe, and then wrap the new line with 'p' tag.<br>
  And on p tag I can apply the dir.</p>