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.7.tar.gz
(2.0 MB
view hashes)
Built Distribution
Close
Hashes for Flask_AceEditor-1.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16738c67d796f8ac014c9db29037059fc95c82198b55bc8acd11bf22b44c464f |
|
MD5 | 4e543f15570469f45359c8927853564e |
|
BLAKE2b-256 | 4b83e2aaff94623e4cbf1d9c20bc3d858908e9a244e8d02e8f8bd8d777e79559 |