From 088ef2234ddeb5471542ccce75e099195add87a9 Mon Sep 17 00:00:00 2001 From: rmp9 <57851775+raizapw19@users.noreply.github.com> Date: Sun, 24 Jul 2022 11:57:26 -0700 Subject: [PATCH] Update README.md Improve the README.md file --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index aaaa01e..b668f77 100644 --- a/README.md +++ b/README.md @@ -8,20 +8,20 @@ ![](./flask_and_mdeditor.png) -**Flask-mdeditor** is Markdown Editor plugin application for [flask]() base on [Editor.md](https://github.com/pandao/editor.md). +**Flask-mdeditor** is Markdown Editor plugin application for [Flask](https://flask.palletsprojects.com/en/2.1.x/) and is based on [Editor.md](https://github.com/pandao/editor.md). -**Flask-mdeditor** was inspired by great [django-mdeditor](https://github.com/pylixm/django-mdeditor), [flask-ckeditor](https://github.com/greyli/flask-ckeditor) +**Flask-mdeditor** was inspired by the great [django-mdeditor](https://github.com/pylixm/django-mdeditor) and [flask-ckeditor](https://github.com/greyli/flask-ckeditor) **Note:** -* For Markdown page rendering issues, backend rendering is recommended. you can use markdon render plugin such like [mistune](https://github.com/lepture/mistune) +* For Markdown page rendering issues, backend rendering is recommended. You can use markdown render plugin such as [mistune](https://github.com/lepture/mistune). ## Features ------------------------------ -* Alomost Editor.md features - * Support Standrad Markdown / CommonMark and GFM(GitHub Flavored Markdown); - * Full-featured: Real-time Preview, Image upload, Preformatted text/Code blocks/Tables insert, search replace, Themes, Multi-languages; - * The MDEditorField is provided for the FlaskForm; +* Almost Editor.md features: + * Supports Standard Markdown/CommonMark and GFM(GitHub Flavored Markdown); + * Full-featured: Real-time Preview, Image upload, Preformatted text/Code blocks/Tables insert, search replace, Themes and Multi-languages; + * The MDEditorField is provided for the FlaskForm. ## Quick Start @@ -29,7 +29,7 @@ ### Installation > `pip install flask-mdeditor` ### Initialization -This extension needs to be initialized in the usual way before it can be used, in order to be able to **save upload image** correctly, `MDEDITOR_FILE_UPLOADER` needed to be frist config, such like: +This extension needs to be initialized in the usual way before it can be used. In order to be able to **save upload image** correctly, `MDEDITOR_FILE_UPLOADER` needs to be first configured, such as: ```python from flask_mdeditor import MDEditor import os @@ -40,7 +40,7 @@ app.config['MDEDITOR_FILE_UPLOADER'] = os.path.join(basedir, 'uploads') # this f mdeditor = MDEditor(app) ``` ### Working with Flask-WTF/WTForms -when using Flask-WTF/WTForms, you can import MDEditorField provided by FLASK-MDEDITOR and use it just like StringField: +When using Flask-WTF/WTForms, you can import MDEditorField provided by FLASK-MDEDITOR and use it just like StringField: ```python from flask_mdeditor import MDEditorField class PostForm(FlaskForm): @@ -48,7 +48,7 @@ class PostForm(FlaskForm): submit = SubmitField() ``` -then you can use it in your template +Then you can use it in your template: ```html
``` -or , if you don't use the wtf, you can use the global jinja2 func `{{ mdeditor.load() }}` to load the editor, such as: +Or, if you don't use the wtf, you can use the global jinja2 func `{{ mdeditor.load() }}` to load the editor, such as: ```html