title: wmd editor (jquery version) over ajax forms
body: <p>i'm trying wmd editor over ajax.
  here there is the <a href="http://barison.org/wmd_ajax_loading_bug.zip" rel="nofollow noreferrer">bugged code</a></p>
  
  <p>wdm code is based on openlibrary fork on github </p>
  
  <p>it work very good without ajax.</p>
  
  <p>but when i try to display editor over ajax form it doesn't load.</p>
  
  <p>non ajax version produce this html:</p>
  
  <pre><code>&lt;div id="wmd-container"&gt;
        &lt;div id="wmd-button-bar"&gt;&lt;/div&gt;
        &lt;div id="wmd-button-bar-0" class="wmd-button-bar"&gt;&lt;ul class="wmd-button-row"&gt;&lt;li style="background-position: 0px 0px;" title="Strong &amp;lt;strong&amp;gt; Ctrl+B" class="wmd-button wmd-bold-button"&gt;&lt;/li&gt;&lt;li style="background-position: -20px 0px;" title="Emphasis &amp;lt;em&amp;gt; Ctrl+I" class="wmd-button wmd-italic-button"&gt;&lt;/li&gt;&lt;li class="wmd-spacer"&gt;&lt;/li&gt;&lt;li style="background-position: -40px 0px;" title="Hyperlink &amp;lt;a&amp;gt; Ctrl+L" class="wmd-button wmd-link-button"&gt;&lt;/li&gt;&lt;li style="background-position: -60px 0px;" title="Blockquote &amp;lt;blockquote&amp;gt; Ctrl+Q" class="wmd-button wmd-quote-button"&gt;&lt;/li&gt;&lt;li style="background-position: -80px 0px;" title="Code Sample &amp;lt;pre&amp;gt;&amp;lt;code&amp;gt; Ctrl+K" class="wmd-button wmd-code-button"&gt;&lt;/li&gt;&lt;li style="background-position: -100px 0px;" title="Image &amp;lt;img&amp;gt; Ctrl+G" class="wmd-button wmd-image-button"&gt;&lt;/li&gt;&lt;li class="wmd-spacer"&gt;&lt;/li&gt;&lt;li style="background-position: -120px 0px;" title="Numbered List &amp;lt;ol&amp;gt; Ctrl+O" class="wmd-button wmd-olist-button"&gt;&lt;/li&gt;&lt;li style="background-position: -140px 0px;" title="Bulleted List &amp;lt;ul&amp;gt; Ctrl+U" class="wmd-button wmd-ulist-button"&gt;&lt;/li&gt;&lt;li style="background-position: -160px 0px;" title="Heading &amp;lt;h1&amp;gt;/&amp;lt;h2&amp;gt; Ctrl+H" class="wmd-button wmd-heading-button"&gt;&lt;/li&gt;&lt;li style="background-position: -180px 0px;" title="Horizontal Rule &amp;lt;hr&amp;gt; Ctrl+R" class="wmd-button wmd-hr-button"&gt;&lt;/li&gt;&lt;li class="wmd-spacer"&gt;&lt;/li&gt;&lt;li style="background-position: -200px -20px;" title="Undo - Ctrl+Z" class="wmd-button wmd-undo-button"&gt;&lt;/li&gt;&lt;li style="background-position: -220px -20px;" title="Redo - Ctrl+Shift+Z" class="wmd-button wmd-redo-button"&gt;&lt;/li&gt;&lt;li style="background-position: -240px 0px;" class="wmd-button wmd-help-button"&gt;&lt;a title="WMD website" target="_blank" href="http://wmd-editor.com/"&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div id="wmd-button-bar-2" class="wmd-button-bar"&gt;&lt;/div&gt;&lt;div id="wmd-button-bar-4" class="wmd-button-bar"&gt;&lt;/div&gt;&lt;textarea id="wmd-input" class="resizable" name="post-text" cols="92" rows="15" tabindex="101"&gt;&lt;/textarea&gt;&lt;div id="wmd-preview-4" class="wmd-preview"&gt;&lt;/div&gt;&lt;div id="wmd-preview-2" class="wmd-preview"&gt;&lt;/div&gt;&lt;div id="wmd-preview-0" class="wmd-preview"&gt;&lt;/div&gt;
        &lt;/div&gt;
  </code></pre>
  
  <p>with ajax form:</p>
  
  <pre><code> &lt;div id="wmd-container"&gt;
          &lt;div id="wmd-button-bar"&gt;&lt;/div&gt;
          &lt;div id="wmd-button-bar-1" class="wmd-button-bar"&gt;&lt;/div&gt;&lt;div id="wmd-button-bar-3" class="wmd-button-bar"&gt;&lt;/div&gt;&lt;textarea id="wmd-input" class="resizable" name="post-text" cols="92" rows="15" tabindex="101"&gt;&lt;/textarea&gt;&lt;div id="wmd-preview-3" class="wmd-preview"&gt;&lt;/div&gt;&lt;div id="wmd-preview-1" class="wmd-preview"&gt;&lt;/div&gt;
  
          &lt;/div&gt;
  </code></pre>
  
  <p>any help?</p>