16 lines
387 B
Python
16 lines
387 B
Python
from flask_wtf import FlaskForm
|
|
from wtforms import TextAreaField
|
|
|
|
class EditorForm(FlaskForm):
|
|
"""
|
|
A text editor with formatting buttons and help. A rendering macro is
|
|
defined in the template widgets/editor.html.
|
|
"""
|
|
|
|
# TODO: How to set DataRequired() dynamically?
|
|
contents = TextAreaField()
|
|
|
|
@property
|
|
def value(self):
|
|
return self.contents.data
|