wtforms aceditor component
Project description
Aceditor wtforms control
Aceditor wtforms control
Use with flask-admin
from wtforms_aceditor import AceEditor
class ExampleView(ModelView):
form_widget_args = {
'config_yaml': {
'style': 'width:100%; height: 200px;'
}
}
form_args = {
'config_yaml': {
'widget': AceEditor('yaml', minLines=4, tabSize=4),
'validators': [YamlValidator()]
}
}
Use with flask-forms
from wtforms_aceditor import AceEditor
class SampleForm(FlaskForm):
code = TextAreaField('config_yaml', widget=AceEditor('yaml'))
Run example
FLASK_APP=example1.app flask run
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wtforms_aceditor-0.0.2.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for wtforms_aceditor-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b7560bfc239e9c1d77f109a1c994308386fa507d590e6ce4d52e36c77cbff44 |
|
MD5 | c2f9a40c891b942c27f30d420960890d |
|
BLAKE2b-256 | 7a48623584ede66b639573208b272a1b5b8a169784af21b716766561b19dca0e |