• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ncornette/Python-Markdown-Editor: Standalone editor for your markdown files

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

ncornette/Python-Markdown-Editor

开源软件地址(OpenSource Url):

https://github.com/ncornette/Python-Markdown-Editor

开源编程语言(OpenSource Language):

JavaScript 93.2%

开源软件介绍(OpenSource Introduction):

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 :

$ pip install markdown-editor

Usage

$ markdown_edit README.md

It will open the editor in your browser :

screenshot

screenshot

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 sync

Dependencies

  • Markdown
  • Pygments
  • Bottle
  • pymdown-extensions

Other usage examples

Launch editor without input file for testing :

$ markdown_edit

Edit markdown file and save both markdown and html outputs :

$ 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 :

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)



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap