推薦一款Markdown在線編輯器MdEditor
Markdown是一種輕量級(jí)的「標(biāo)記語言」
Markdown是一種可以使用普通文本編輯器編寫的標(biāo)記語言都弹,通過簡(jiǎn)單的標(biāo)記語法,它可以使普通文本內(nèi)容具有一定的格式猜丹。它允許人們使用易讀易寫的純文本格式編寫文檔,然后轉(zhuǎn)換成格式豐富的HTML頁面煞抬,Markdown文件的后綴名便是“.md”
MdEditor是一個(gè)在線編輯Markdown文檔的編輯器
MdEditor擴(kuò)展了Markdown的功能(如表格疟羹、腳注、內(nèi)嵌HTML等等)围橡,以使讓Markdown轉(zhuǎn)換成更多的格式暖混,和更豐富的展示效果,這些功能原初的Markdown尚不具備翁授。
Markdown增強(qiáng)版中比較有名的有Markdown Extra拣播、MultiMarkdown晾咪、 Maruku等。這些衍生版本要么基于工具贮配,如
Pandoc谍倦,Pandao;要么基于網(wǎng)站泪勒,如GitHub和Wikipedia昼蛀,在語法上基本兼容,但在一些語法和渲染效果上有改動(dòng)圆存。
MdEditor源于Pandao的JavaScript開源項(xiàng)目叼旋,開源地址Editor.md,并在MIT開源協(xié)議的許可范圍內(nèi)進(jìn)行了優(yōu)化沦辙,以適應(yīng)廣大用戶群體的需求夫植。向優(yōu)秀的markdown開源編輯器原作者Pandao致敬。
MdEditor的功能列表演示
標(biāo)題H1
標(biāo)題H2
標(biāo)題H3
標(biāo)題H4
標(biāo)題H5
標(biāo)題H5
字符效果和橫線等
刪除線 <s>刪除線(開啟識(shí)別HTML標(biāo)簽時(shí))</s>
斜體字 斜體字
粗體 粗體
粗斜體 粗斜體
上標(biāo):X2油讯,下標(biāo):O2
縮寫(同HTML的abbr標(biāo)簽)
即更長(zhǎng)的單詞或短語的縮寫形式偷崩,前提是開啟識(shí)別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://www.mdeditor.com
[錨點(diǎn)鏈接][anchor-id]
[anchor-id]: https://www.mdeditor.com/
mailto:test.test@gmail.com
GFM a-tail link @pandao
郵箱地址自動(dòng)鏈接 test.test@gmail.com www@vip.qq.com
@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!");
}
HTML 代碼 HTML codes
<!DOCTYPE html>
<html>
<head>
<mate charest="utf-8" />
<meta name="keywords" content="Editor.md, Markdown, Editor" />
<title>Hello world!</title>
<style type="text/css">
body{font-size:14px;color:#444;font-family: "Microsoft Yahei", Tahoma, "Hiragino Sans GB", Arial;background:#fff;}
ul{list-style: none;}
img{border:none;vertical-align: middle;}
</style>
</head>
<body>
<h1 class="text-xxl">Hello world!</h1>
<p class="text-green">Plain text</p>
</body>
</html>
圖片 Images
圖片加鏈接 (Image + Link):
Follow your heart.
列表 Lists
無序列表(減號(hào))Unordered Lists (-)
- 列表一
- 列表二
- 列表三
無序列表(星號(hào))Unordered Lists (*)
- 列表一
- 列表二
- 列表三
無序列表(加號(hào)和嵌套)Unordered Lists (+)
- 列表一
- 列表二
- 列表二-1
- 列表二-2
- 列表二-3
- 列表三
- 列表一
- 列表二
- 列表三
有序列表 Ordered Lists (-)
- 第一行
- 第二行
- 第三行
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 |
特殊符號(hào) 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:;
反斜杠 Escape
*literal asterisks*
[========]
科學(xué)公式 TeX(KaTeX)
行內(nèi)的公式行內(nèi)的公式,行內(nèi)的
公式邻奠。
多行公式:
\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
分頁符 Page break
Print Test: Ctrl + P
[========]
繪制流程圖 Flowchart
st=>start: 用戶登陸
op=>operation: 登陸操作
cond=>condition: 登陸成功 Yes or No?
e=>end: 進(jìn)入后臺(tái)
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!