MarkdownPad,一款不錯的Markdown編輯器,本人一直在用,具備所有Markdown的基本語法外支持一些特別的擴展,比如表格等。
MarkdownPad分為免費版和收費版,區別是免費版不支持擴展和部分特性,其實可以通過自己修改配置文件解決,達到使用所有功能,本文記錄了配置文件的一些常用設置和擴展特性說明。
配置文件
一般在用戶的數據目錄,如:
C:\Users\xxx\AppData\Local\MarkdownPad2\MarkdownPad2.exe_Url_vs4d4elqagqf30mlwjilaxymtj2joonl\2.1.18.37279
啟用Markdown擴展模式
<setting name="Markdown_Extra_ExtraMode" serializeAs="String">
<value>True</value>
</setting>
<setting name="Markdown_MarkdownProcessor" serializeAs="String">
<value>MarkdownExtra</value>
</setting>
Markdown處理器:Github風格
<setting name="Markdown_MarkdownProcessor" serializeAs="String">
<value>GitHubFlavoredMarkdown</value>
</setting>
語法檢查設置
<setting name="Editor_EnableHyperlinks" serializeAs="String">
<value>False</value>
</setting>
擴展使用參考:
MarkdownPad2用的是php Markdown Extra的解析器,不過只支持部分,還有角標等支持不太好。
URL:http://michelf.ca/projects/php-markdown/extra/#html
主要特點:
-
行內HTML
默認Markdown語法添加HTML內容塊前后必須有空行,且開始標簽與結尾標簽不能用制表符或空格來縮進; -
在HTML塊中使用Markdown
默認Markdown語法在 HTML 區塊標簽間的 Markdown 格式語法將不會被處理; -
擴展屬性,如:class,id等
擴展屬性生效的HTML標簽包括:headers,fenced code blocks,links, and images.
e.g.
- 指定ID
## Header 2 ## {#header2}
,鏈接到此元素[Link back to header 1](#header1)
- 指定CLASS
## The Site ## {.main}
- 指定ID 和 CLASS
## The Site ## {.main .shine #the-site}
- 圖片和鏈接的用法:
[link](url){#id .class}
/{#id .class}
- 指定ID
-
閉合代碼塊,關鍵字:~,Github用的是:`,三個以上
語法:
~~~~~~~~~~~~~~~~~~~~~ a one-line code block ~~~~~~~~~~~~~~~~~~~~~
效果:
a one-line code block
-
表格語法,表格內容中可以使用Markdown語法
語法:
First Header | Second Header ------------- | -------------: //表示內容右對齊 Content Cell | **Content Cell** Content Cell | Content Cell
效果:
First Header Second Header Content Cell Content Cell Content Cell Content Cell -
列表定義,dl列表,dt和dd
關鍵定:(:),以 (:) 開頭,(:) 后面有一個或多個空格,(:)可以有多個,每個是一個段落。
語法:
Term 1 : This is a definition with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. : Second definition for term 1, also wrapped in a paragraph because of the blank line preceding it. Term 2 : This definition has a code block, a blockquote and a list. code block. > block quote > on two lines. 1. first list item 2. second list item
效果:
- Term 1
-
This is a definition with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
-
Second definition for term 1, also wrapped in a paragraph because of the blank line preceding it.
- Term 2
-
This definition has a code block, a blockquote and a list.
code block.
block quote on two lines.
- first list item
- second list item
附:
- Markdown語法參考中文版:http://wowubuntu.com/markdown/
- MarkdownPad編輯器h:http://markdownpad.com/