title: Using Bootstrap wysiwyg text editor in Django Form
body: <p>I am using Django and Bootrap 2.32. I want to include this wysiwyg-bootrap-themed text editor: <a href="http://mindmup.github.io/bootstrap-wysiwyg/" rel="nofollow">http://mindmup.github.io/bootstrap-wysiwyg/</a>. The usage of this editor is fairly simple, including</p>
  
  <pre class="lang-js prettyprint-override"><code>$('#editor').wysiwyg();
  </code></pre>
  
  <p>in the JS-declaration will render each </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div class=editor&gt;&lt;/div&gt;
  </code></pre>
  
  <p>into a beatiful wysiwyg text-editor.</p>
  
  <p>Now the problem: I want to include this editor into one of my django form field. I have the single form:</p>
  
  <pre class="lang-python prettyprint-override"><code>class Article_Form(ModelForm):
      Article_text = CharField(widget=Textarea(attrs = {'id' : 'editor'}))
      class Meta:
          model= Article
  </code></pre>
  
  <p>, whereas the <code>Article</code> model includes one simple <code>CharField</code> . Is there any chance, to get the editor work inside the <code>Article_text</code> form-field? With the above-mentioned widget, the created textarea cannot be controlled by the wysiwyg-editor-control buttons. Wrapping the form-template-tag like this</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="editor"&gt;
      {{ Article_Form.Article_text }}                                
  &lt;/div&gt;
  </code></pre>
  
  <p>doesn't work either. The problem thus is that Django creates a <code>textarea</code>, wheras the editor would need a <code>&lt;div&gt;</code> to render correctly. Do you guys have any idea how to get this to work (without refering to django-wysiwyg).</p>
  
  <p>Thanks!</p>