Pagedown for Flask
Project description
Flask-MDE: Pagedown for Flask
Release v1.2.0 | Example application
Pagedown Editor with Google code-prettify for Flask. WTForms integration supported. From v1.2.0 Flask-MDE supports pagedown-extra.
Pagedown is a Markdown editor and previewer popularised by its use on StackOverflow. You can use the Flask-MDE extension to integrate the Pagedown editor into your Flask application.
Installation
Installing Flask-MDE is simple with pip. To install Flask-MDE, run the command
pip install Flask-MDE
in your terminal
Basic Usage
Assuming the following folder structure:
.
├── app.py
└── templates/
└── index.html
Files
app.py
from flask import Flask, render_template
from flask_mde import Mde
app = Flask(__name__)
mde = Mde(app)
@app.route('/')
def index():
return render_template(
"index.html"
)
if __name__ == "__main__":
app.run()
templates/index.html
<!DOCTYPE html>
<html lang="en">
<head>
{{mde.css}}
</head>
<body>
{{mde.editor()}}
{{mde.preview}}
{{mde.js}}
</body>
</html>
Licenses that apply
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-MDE-1.2.0.tar.gz
(84.1 kB
view hashes)
Built Distribution
Flask_MDE-1.2.0-py3-none-any.whl
(86.2 kB
view hashes)
Close
Hashes for Flask_MDE-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a29f5f04bbabc36e0d9af26625bd5f11d2c1df60d61ea7b3eed0353e6925e752 |
|
MD5 | 531e5cafd661f4afd37b182647e6a706 |
|
BLAKE2b-256 | 23efc04c0095edfe80de2213149335cc5d5c0fbdd20c3b405f578773d6abe1a5 |