Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ncornette/python-markdown-editor
Standalone editor for your markdown files
https://github.com/ncornette/python-markdown-editor
bottle bottlepy browser editor extensible gfm javascript markdown modular python-2 python-3
Last synced: about 1 month ago
JSON representation
Standalone editor for your markdown files
- Host: GitHub
- URL: https://github.com/ncornette/python-markdown-editor
- Owner: ncornette
- Created: 2014-03-09T22:19:48.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-01-24T11:39:34.000Z (almost 3 years ago)
- Last Synced: 2024-10-12T09:03:49.332Z (about 1 month ago)
- Topics: bottle, bottlepy, browser, editor, extensible, gfm, javascript, markdown, modular, python-2, python-3
- Language: JavaScript
- Size: 1.43 MB
- Stars: 209
- Watchers: 13
- Forks: 55
- Open Issues: 6
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
Python-Markdown-Editor
======================|Build Status| |PyPI py versions| |PyPI version| |Code quality|
Standalone editor for your local markdown files
Installation
~~~~~~~~~~~~To install the latest stable version from Pypi :
.. code:: sh
$ pip install markdown-editor
Usage
~~~~~.. code:: sh
$ markdown_edit README.md
It will open the editor in your browser :
.. figure:: https://github.com/ncornette/Python-Markdown-Editor/raw/master/screenshot.png
:alt: screenshotscreenshot
Features
~~~~~~~~- Side-by-side markdown editor & html preview
- Live, when you type html preview
- Codehilite & markdown extra syntax support by default
- Github syntax support
- Github styles for rendering and codehilite
- Scrollbars syncDependencies
~~~~~~~~~~~~- Markdown
- Pygments
- Bottle
- pymdown-extensionsOther usage examples
~~~~~~~~~~~~~~~~~~~~Launch editor without input file for testing :
.. code:: bash
$ markdown_edit
Edit markdown file and save both markdown and html outputs :
.. code:: bash
$ markdown_edit -f README.html README.md
Extensible
~~~~~~~~~~You can import this script as a module to write your own applications
based on the markdown editor.example :
.. code:: python
from markdown_editor import web_edit
from markdown_editor.editor import MarkdownDocument# ...
MY_HTML_HEAD = 'Editor title'
def action_send(document):
send_markdown_text(document.text)
# or
send_raw_html_code(document.getHtml())
# or
send_html_with_styles(document.getHtmlPage())return html_to_display_as_result, keep_running_local_server
if __name__ == '__main__:
doc = MarkdownDocument()
web_edit.start(doc,
custom_actions=[
('Send', action_send),
],
title=MY_HTML_HEAD).. |Build Status| image:: https://travis-ci.org/ncornette/Python-Markdown-Editor.svg?branch=master
:target: https://travis-ci.org/ncornette/Python-Markdown-Editor
.. |PyPI py versions| image:: https://img.shields.io/pypi/pyversions/Markdown-Editor.svg?maxAge=2592000
:target: https://pypi.python.org/pypi/Markdown-Editor
.. |PyPI version| image:: https://img.shields.io/pypi/v/Markdown-Editor.svg?maxAge=2592000
:target: https://pypi.python.org/pypi/Markdown-Editor
.. |Code quality| image:: https://api.codacy.com/project/badge/Grade/189b747c1f874f3090168cae42b35217
:target: https://www.codacy.com/manual/nicolas-cornette/Python-Markdown-Editor?utm_source=github.com&utm_medium=referral&utm_content=ncornette/Python-Markdown-Editor&utm_campaign=Badge_Grade