Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bittobennichan/flask-mde

Markdown editor with WTForms integration for Flask
https://github.com/bittobennichan/flask-mde

flask markdown markdown-editor pagedown

Last synced: about 2 months ago
JSON representation

Markdown editor with WTForms integration for Flask

Awesome Lists containing this project

README

        

Flask-MDE: Pagedown for Flask
=============================

Release v1.2.1 | `Example application `_

.. image:: https://img.shields.io/pypi/v/flask_mde
:target: https://pypi.org/project/flask_mde/

.. image:: https://img.shields.io/pypi/l/flask_mde
:target: https://pypi.org/project/flask_mde/

.. image:: https://img.shields.io/pypi/pyversions/flask_mde
:target: https://pypi.org/project/flask_mde/

.. image:: https://readthedocs.org/projects/flask-mde/badge/?version=latest
:target: https://flask-mde.readthedocs.io/en/latest/?badge=latest

.. image:: https://pepy.tech/badge/flask-mde
:target: https://pepy.tech/project/flask-mde

-------------------

`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

.. code-block:: text

pip install Flask-MDE

in your terminal

Basic Usage
###########
Assuming the following folder structure:

.. code-block:: text

.
├── app.py
└── templates/
└── index.html

**Files**

*app.py*

.. code-block:: python

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*

.. code-block:: html




{{mde.css}}


{{mde.editor()}}
{{mde.preview}}
{{mde.js}}

`Read the user guide to check out all the features. `_

Licenses that apply
===================

1. `Flask-MDE License (MIT) `_
2. `Pagedown-Extra License `_
3. `Pagedown License `_