Python Markdown Editor
1.0.0
您本地降價文件的獨立編輯器
要安裝PYPI的最新穩定版本:
$ pip install markdown-editor$ markdown_edit README.md它將在您的瀏覽器中打開編輯器:

螢幕截圖
啟動編輯器沒有用於測試的輸入文件:
$ markdown_edit編輯標記文件,並同時保存Markdown和HTML輸出:
$ markdown_edit -f README.html README.md您可以將此腳本作為模塊導入基於Markdown編輯器編寫自己的應用程序。
例子 :
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 )