Skip to main content

This is AceEditor on flask.

Project description

flask-aceeditor

Because of this library (flask-aceeditor), it can be easily called when using the ace editor!

Install

$ pip install flask-aceeditor

use

from flask_aceeditor import *
...
aceeditor = AceEditor(app)

Load js file

...
{{ ace.load() }}<!-- be sure to precede the code using the ace editor! ! ! -->
...

Create editor (with color change button)

...
{{ ace.create(name="code", code="print('hello')") }}
<!-- name default is "code" code is code, default is "print('Hello World!')" -->
Note: When submitting the form, the field is the parameter name you passed in when you created it

因为这个库(flask-aceeditor),所以在使用ace编辑器能很方便地调用了!

安装

$ pip install flask-aceeditor

使用

from flask_aceeditor import *
...
aceeditor = AceEditor(app)

加载js文件

...
{{ ace.load() }}<!-- 一定要在使用ace编辑器的代码前面!!! -->
...

创建编辑器(有颜色变换按钮)

...
{{ ace.create(name="code", code="print('hello')") }}
<!-- name默认是"code" code是代码,默认是"print('Hello World!')" -->
注:提交表单时,字段是你当时创建时传入的参数name

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

Flask-AceEditor-1.0.5.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

Flask_AceEditor-1.0.5-py3-none-any.whl (2.1 MB view details)

Uploaded Python 3

File details

Details for the file Flask-AceEditor-1.0.5.tar.gz.

File metadata

  • Download URL: Flask-AceEditor-1.0.5.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.4

File hashes

Hashes for Flask-AceEditor-1.0.5.tar.gz
Algorithm Hash digest
SHA256 718fead004856e7b89575ebaa9851f2219a6bd6efb950415c540a5b8f2c9f23e
MD5 2f2bb3bfd9a5cd85200c5e555fd9a7c0
BLAKE2b-256 cb5007083bc0ddf1e4976e700bb1269dd7068715e1944a96b853e39cc34b1a43

See more details on using hashes here.

File details

Details for the file Flask_AceEditor-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for Flask_AceEditor-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4882e82cf786afd29d57acefef193402ba4df85973a1baf75a3249be825d442f
MD5 917496b67929948c3d0c8979c47b24ec
BLAKE2b-256 1f58722dce1553b73e0e2af307873ec7d09b3f13b50dfa5a86b5d75a4daccc5c

See more details on using hashes here.

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