這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Markdown Shortcode

外掛說明

Damn simple [markdown]#via shortcode[/markdown] for wordpress.
This plugin uses parsedown and highlight.js. Zero configuration.

Write this into the editor:

[markdown]  
#h1

h2

text  
____source code (two ore more underscores will be replaced by empty spaces)  
____source code (two ore more underscores will be replaced by empty spaces)  

    `javascript
source code
    `
[/markdown]

and the shortcode content will be parsed with parsedown. Syntax highlighting will appear for the source codes.

This plugin is available at github, too.
Please report issues at github, pull requests are welcome, too!

螢幕擷圖

  • Blog post written in markdown.
  • Same blog post on front end.

安裝方式

  1. Upload the markdown-shortcode directory to the /wp-content/plugins directory.
  2. Activate the plugin through the plugins menu in WordPress.
  3. Use it by wrapping text in the shortcode

常見問題集

Will it work in the Visual Editor?

Yes. You can switch between Visual and Text(HTML) mode. The plugin converts html entities back to the original characters.

The WYSIWYG editor (TinyMCE) is removing empty spaces!

Indeed, TinyMCE is well-known for destroying markup. Replace empty spaces with underscores __ .
Underscores will be converted to empty spaces right before markdown conversion.

使用者評論

2017 年 6 月 30 日
It parses pasted text perfectly. Remember to edit the post in "plain text" and not in "visual" mode!! Best of best! Thanks so much for creating it.
2016 年 9 月 3 日
Does what it says and does it cleanly. Had an issue with conflicting plugins dev fixed it very quickly.
2016 年 9 月 3 日
Work as expected , thank you, simple and efficient. (just write "[markdown] blabla [/markdown] with your wysiwyg as "text" )
閱讀全部 3 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Markdown Shortcode〉的開發相關工作。

參與者

將〈Markdown Shortcode〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

0.1

  • see https://github.com/JohannesHoppe/markdown-shortcode/releases for a list of all releases