無標(biāo)題文章

主要特性

  • 支持“標(biāo)準(zhǔn)”Markdown / CommonMark和Github風(fēng)格的語法,也可變身為代碼編輯器;
  • 支持實(shí)時(shí)預(yù)覽、圖片(跨域)上傳、預(yù)格式文本/代碼/表格插入、代碼折疊、搜索替換、只讀模式、自定義樣式主題和多語言語法高亮等功能;
  • 支持ToC(Table of Contents)、Emoji表情、Task lists、@鏈接等Markdown擴(kuò)展語法;
  • 支持TeX科學(xué)公式(基于KaTeX)、流程圖 Flowchart 和 時(shí)序圖 Sequence Diagram;
  • 支持識別和解析HTML標(biāo)簽,并且支持自定義過濾標(biāo)簽解析,具有可靠的安全性和幾乎無限的擴(kuò)展性;
  • 支持 AMD / CMD 模塊化加載(支持 Require.js & Sea.js),并且支持自定義擴(kuò)展插件;
  • 兼容主流的瀏覽器(IE8+)和Zepto.js,且支持iPad等平板設(shè)備;
  • 支持自定義主題樣式;

Editor.md

目錄 (Table of Contents)

[TOCM]

[TOC]

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Heading 1 link Heading link

Heading 2 link Heading link

Heading 3 link Heading link

Heading 4 link Heading link Heading link Heading link

Heading 5 link Heading link
Heading 6 link Heading link

標(biāo)題(用底線的形式)Heading (underline)

This is an H1

This is an H2

字符效果和橫線等


刪除線 <s>刪除線(開啟識別HTML標(biāo)簽時(shí))</s>
斜體字 斜體字
粗體 粗體
粗斜體 粗斜體

上標(biāo):X2,下標(biāo):O2

縮寫(同HTML的abbr標(biāo)簽)

即更長的單詞或短語的縮寫形式,前提是開啟識別HTML標(biāo)簽時(shí),已默認(rèn)開啟

The <abbr title="Hyper Text Markup Language">HTML</abbr> specification is maintained by the <abbr title="World Wide Web Consortium">W3C</abbr>.

引用 Blockquotes

引用文本 Blockquotes

引用的行內(nèi)混合 Blockquotes

引用:如果想要插入空白換行即<br />標(biāo)簽,在插入處先鍵入兩個(gè)以上的空格然后回車即可,普通鏈接。

錨點(diǎn)與鏈接 Links

普通鏈接

普通鏈接帶標(biāo)題

直接鏈接:https://github.com

錨點(diǎn)鏈接

GFM a-tail link @pandao

@pandao

多語言代碼高亮 Codes

行內(nèi)代碼 Inline code

執(zhí)行命令:npm install marked

縮進(jìn)風(fēng)格

即縮進(jìn)四個(gè)空格,也做為實(shí)現(xiàn)類似<pre>預(yù)格式化文本(Preformatted Text)的功能。

<?php
    echo "Hello world!";
?>

預(yù)格式化文本:

| First Header  | Second Header |
| ------------- | ------------- |
| Content Cell  | Content Cell  |
| Content Cell  | Content Cell  |

JS代碼

function test(){
    console.log("Hello world!");
}
 
(function(){
    var box = function(){
        return box.fn.init();
    };

    box.prototype = box.fn = {
        init : function(){
            console.log('box.init()');

            return this;
        },

        add : function(str){
            alert("add", str);

            return this;
        },

        remove : function(str){
            alert("remove", str);

            return this;
        }
    };
    
    box.fn.init.prototype = box.fn;
    
    window.box =box;
})();

var testBox = box();
testBox.add("jQuery").remove("jQuery");

HTML代碼 HTML codes

<!DOCTYPE html>
<html>
    <head>
        <mate charest="utf-8" />
        <title>Hello world!</title>
    </head>
    <body>
        <h1>Hello world!</h1>
    </body>
</html>

圖片 Images

Image:

Follow your heart.

圖為:廈門白城沙灘

圖片加鏈接 (Image + Link):

圖為:李健首張專輯《似水流年》封面


列表 Lists

無序列表(減號)Unordered Lists (-)

  • 列表一
  • 列表二
  • 列表三

無序列表(星號)Unordered Lists (*)

  • 列表一
  • 列表二
  • 列表三

無序列表(加號和嵌套)Unordered Lists (+)

  • 列表一
  • 列表二
    • 列表二-1
    • 列表二-2
    • 列表二-3
  • 列表三
    • 列表一
    • 列表二
    • 列表三

有序列表 Ordered Lists (-)

  1. 第一行
  2. 第二行
  3. 第三行

GFM task list

  • [x] GFM task list 1
  • [x] GFM task list 2
  • [ ] GFM task list 3
    • [ ] GFM task list 3-1
    • [ ] GFM task list 3-2
    • [ ] GFM task list 3-3
  • [ ] GFM task list 4
    • [ ] GFM task list 4-1
    • [ ] GFM task list 4-2

繪制表格 Tables

項(xiàng)目 價(jià)格 數(shù)量
計(jì)算機(jī) $1600 5
手機(jī) $12 12
管線 $1 234
First Header Second Header
Content Cell Content Cell
Content Cell Content Cell
First Header Second Header
Content Cell Content Cell
Content Cell Content Cell
Function name Description
help() Display the help window.
destroy() Destroy your computer!
Left-Aligned Center Aligned Right Aligned
col 3 is some wordy text $1600
col 2 is centered $12
zebra stripes are neat $1
Item Value
Computer $1600
Phone $12
Pipe $1

特殊符號 HTML Entities Codes

? & ¨ ? ? £
& < > ¥ € ? ± ? § | ˉ ? ·

X2 Y3 ? ? × ÷ ?

18oC " '

Emoji表情 :smiley:

Blockquotes :star:

GFM task lists & Emoji & fontAwesome icon emoji & editormd logo emoji :editormd-logo-5x:

  • [x] :smiley: @mentions, :smiley: #refs, links, formatting, and <del>tags</del> supported :editormd-logo:;
  • [x] list syntax required (any unordered or ordered list supported) :editormd-logo-3x:;
  • [x] [ ] :smiley: this is a complete item :smiley:;
  • [ ] []this is an incomplete item test link :fa-star: @pandao;
  • [ ] [ ]this is an incomplete item :fa-star: :fa-gear:;
    • [ ] :smiley: this is an incomplete item test link :fa-star: :fa-gear:;
    • [ ] :smiley: this is :fa-star: :fa-gear: an incomplete item test link;

反斜杠 Escape

*literal asterisks*

科學(xué)公式 TeX(KaTeX)

$$E=mc^2$$

行內(nèi)的公式$$E=mc2$$行內(nèi)的公式,行內(nèi)的$$E=mc2$$公式。

$$(\sqrt{3x-1}+(1+x)^2)$$

$$\sin(\alpha){\theta}=\sum_{i=0}{n}(x^i + \cos(f))$$

多行公式:

\displaystyle
\left( \sum\_{k=1}^n a\_k b\_k \right)^2
\leq
\left( \sum\_{k=1}^n a\_k^2 \right)
\left( \sum\_{k=1}^n b\_k^2 \right)
\displaystyle 
    \frac{1}{
        \Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{
        \frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {
        1+\frac{e^{-6\pi}}
        {1+\frac{e^{-8\pi}}
         {1+\cdots} }
        } 
    }
f(x) = \int_{-\infty}^\infty
    \hat f(\xi)\,e^{2 \pi i \xi x}
    \,d\xi

繪制流程圖 Flowchart

st=>start: 用戶登陸
op=>operation: 登陸操作
cond=>condition: 登陸成功 Yes or No?
e=>end: 進(jìn)入后臺

st->op->cond
cond(yes)->e
cond(no)->op

繪制序列圖 Sequence Diagram

Andrew->China: Says Hello 
Note right of China: China thinks\nabout it 
China-->Andrew: How are you? 
Andrew->>China: I am good thanks!

End

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容