Skip to main content

wtforms aceditor component

Project description

Upload Python Package

Aceditor wtforms control

Aceditor wtforms control

https://ace.c9.io/

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


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)

Uploaded Source

Built Distribution

wtforms_aceditor-0.0.2-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page