def integrate_ckeditor(): form = RichTextForm() if form.validate_on_submit(): title = form.title.data body = form.body.data flash('Your post is published!') return render_template('post.html', title=title, body=body) return render_template('ckeditor.html', form=form)
def ckeditor(): form = RichTextForm() if form.validate_on_submit(): if form.save.data: flash("Save successful!") elif form.publish.data: flash("Publish successful!") return redirect(url_for('index')) return render_template('richtextform.html', form=form)
def ckeditor(): form = RichTextForm() #if form.submit(): if form.submit.data: title = form.title.data body = form.body.data print(title) print(body) return render_template('post.html', title=title, body=body) return render_template('ckeditor.html', form=form)
def test_ckeditor(): form = RichTextForm() if form.validate_on_submit(): if form.publish.data: title = form.title.data body = form.body.data return render_template("post_rich.html", title=title, body=body) elif form.save.data: print("dianjilesave") return render_template("ckeditor.html", form=form)
def question(): form = RichTextForm() if request.method == 'GET': return render_template('question.html', form=form) else: #title = request.form.get('title') #content = request.form.get('content') if form.validate_on_submit(): title = form.title.data content = form.body.data question = Question(title=title, content=content) question.author = g.user db.session.add(question) db.session.commit() return redirect(url_for('index')) return render_template('post.html', title=title, body=content) return render_template('question.html', form=form)
def richtext(): form = RichTextForm() return render_template('ckeditor.html', form=form)
def ckeditor(): form = RichTextForm() if form.validate_on_submit(): pass return render_template('ckeditor.html', form=form)
def editor(): form = RichTextForm() return render_template('editor.html', form=form)