Replace textarea with a rich text editor in Flask Admin

I would like to know how best to replace the standard textarea field with a rich text editor in Flask Admin? How about a well-wisher? And how to do it?

+5
source share
1 answer

Here's how you can do it: https://gist.github.com/mrjoes/5189850

Even if this example shows how to integrate CKEditor, the process will not be different from another WYSIWYG editor:

  • Create a wtforms widget that provides the necessary HTML for the editor. For CKEditor, this is the class 'ckeditor';
  • Create a wtforms field that uses this widget
  • Create a new template that will include an editor for JS files (s)
  • Flask-Admin, .
+11

All Articles