How to add bootstrap wysiwyg into flask?
<p>I want to using  <a href="https://github.com/mindmup/bootstrap-wysiwyg/" rel="nofollow">bootstrap wysiwyg</a> in my <code>Flask</code> website.
I found this project <a href="https://github.com/TCnet/flask-wysiwyg" rel="nofollow">flask-wysiwyg</a> and followed the author's advise, but it doesn't work.</p>

<p>I would like to know:</p>

<ul>
<li>What is wrong?</li>
<li>How should I solve this by myself?</li>
</ul>

<p>Here is the code:</p>

<p>form.py</p>

<pre><code>from .wysiwyg import WysiwygField

class PostForm(Form):
    article_title = StringField(u'title', validators=[Required(), Length(1, 64)])
    body = WysiwygField(u"txteditor", validators=[Required()])
    submit = SubmitField(u'submit')
</code></pre>

<p>view.py</p>

<pre><code># views.py
from .forms import PostForm
@main.route('/post', methods=['GET', 'POST'])
@login_required
def post():
    title = u'edit'
    form = PostForm()
    if  form.validate_on_submit():
        posts = Post(article_title=form.article_title.data,
                     body=form.body.data,
                     author=current_user._get_current_object())
        db.session.add(posts)
        flash(u'commit')
        return redirect(url_for('.doc'))
    return render_template('post-rich-text-edit.html', title=title, form=form)
</code></pre>

<p>post-rich-text-edit.html</p>

<pre><code>{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}

{% block head %}
{{ super() }}
&lt;link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='prettify.css') }}"&gt;
&lt;link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='font-awesome.css') }}"&gt;


    &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"&gt;&lt;/script&gt;
{% endblock %}

{% block page_content %}
&lt;div class="page-header"&gt;
    &lt;div class="row"&gt;
        &lt;div class="col-md-12"&gt;
            &lt;form method=post action="/"&gt;
            {{ form.article_title }}
                {{ form.hidden_tag() }}
                {{ form.body.label }}
                &lt;div id="editor"&gt;
                {{ form.body(size=20) }}

                &lt;/div&gt;
            {{ form.submit }}
            &lt;/form&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
{% endblock %}

{% block scripts %}
{{ super() }}
    &lt;script  type="text/javascript" src="{{ url_for('static', filename='bootstrap-wysiwyg.js') }}"&gt;&lt;/script&gt;
    &lt;script  type="text/javascript" src="{{ url_for('static', filename='jquery.hotkeys.js') }}"&gt;&lt;/script&gt;
    &lt;script  type="text/javascript" src="{{ url_for('static', filename='prettify.js') }}"&gt;&lt;/script&gt;
{% endblock %}
</code></pre>