Skip to content

xiaoz170/editor.md

 
 

Repository files navigation

Editor.md

Editor.md : The open source online markdown editor (component), based on CodeMirror & jQuery & Marked.

Features

  • Support Standard Markdown / CommonMark and GFM(GitHub Flavored Markdown);
  • Full-featured: Real-time Preview, Image (cross-domain) upload, Preformatted text/Code blocks/Tables insert, Code fold, Search replace, Read only, Themes, Multi-languages, L18n, HTML entities, Code syntax highlighting...;
  • Markdown Extras : Support ToC (Table of Contents), Emoji, Task lists, @Links...;
  • Compatible with all major browsers (IE8+), compatible Zepto.js and iPad;
  • Support identification, interpretation, fliter of the HTML tags;
  • Support TeX (LaTeX expressions, Based on KaTeX), Flowchart and Sequence Diagram of Markdown extended syntax;
  • Support AMD/CMD (Require.js & Sea.js) Module Loader, and Custom/define editor plugins;

README & Examples (English)


Editor.md 是一个基于CodeMirror、jQuery 和 Marked 构建的开源 Markdown 在线编辑器(组件)。

editormd-screenshot

主要特性

在线演示 (Examples)

https://pandao.github.io/editor.md/examples/index.html

下载和安装 (Download & install)

通过 Github下载安装,或者通过 Bower 安装:

bower install editor.md

使用方法 (Usage)

HTML:

<link rel="stylesheet" href="editormd.min.css" />
<div id="editormd">
    <textarea style="display:none;">### Hello world!</textarea>
</div>

提示1:如果没有Markdown源内容或者通过Ajax异步加载Markdown源文档等,可以不添加<textarea>,会自动添加;

javascript:

<script src="jquery.min.js"></script>
<script src="editormd.min.js"></script>
<script type="text/javascript">
    $(function() {
        var editor = editormd("editormd", {
            path : "../lib/" // codemirror, marked等依赖的库的路径
        });

        /*
        // or
        var editor = editormd({
            id   : "editormd",
            path : "../lib/"
        });
        */
    });
</script>

Require.js的使用方法:https://github.com/pandao/editor.md/tree/master/examples/use-requirejs.html

Sea.js的使用方法:https://github.com/pandao/editor.md/tree/master/examples/use-seajs.html

依赖项目及感谢 (Dependents)

Changes

更新日志 Change logs

License

The MIT License.

Copyright (c) 2015 Pandao

About

The open source online markdown editor (component).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 58.0%
  • HTML 22.1%
  • CSS 18.5%
  • PHP 1.4%