开发者 | mattwiebe |
---|---|
更新时间 | 2015年12月2日 06:20 |
PHP版本: | 3.4 及以上 |
WordPress版本: | 4.3.x |
post_content_formatted
column), so you can deactivate this plugin and your posts won't spew out Markdown, because HTML is stored in the post_content
column, just like normal. This is also much faster than doing on-the-fly Markdown conversion on every page load. It's only done once! When you re-edit the post, the markdown version is swapped into the editor for you to edit.
markdown-on-save-improved
folder to your /wp-content/plugins/
directoryPlain and simple: I get paid to write and maintain the Jetpack version. It gets used by a lot more people and gets regular bug fixes. There are even support people who will help you if you have problems! If you liked MoSI, you'll love the Jetpack Markdown module. It's even easier to use - just enable it for a blog and every post is just converted to Markdown. There are tons of edge case fixes, improved GitHub-Flavoured syntax additions, better revision handling, and more.
Please refer to this resource: PHP Markdown Extra.
In most cases this should be unnecessary, since Markdown ignores existing HTML. But if Markdown for some reason disturbs your HTML when making an edit to a non-Markdown post, either check the "Disable Markdown formatting" checkbox, or put a <!--no-markdown-->
HTML comment in your post somewhere (useful when using a mobile or 3rd party blogging app).
Just add add_post_type_support( 'your-post-type', 'markdown-osi' );
to your functionality plugin functions.php
file. Note that it must be hooked to the init
action like this:
add_action( 'init', 'your_prefix_add_markdown_support' );
function your_prefix_add_markdown_support(){
add_post_type_support( 'your-post-type', 'markdown-osi' );
}
Note that posts and pages are supported by default.
There is an experimental checkbox in the post editor to convert your old HTML post to Markdown using Markdownify. Check it at your own risk. Make sure you have revisions on or backups. If you're relying on specifically crafted HTML, it might get destroyed. But it might be cool.
I see you love Markdown greatly. You have chosen wisely. Add the following constant to your wp-config.php file:
define( 'SD_HIDE_MARKDOWN_BOX', true );
Note that you can still disable Markdown formatting with a <!--no-markdown-->
HTML comment. HTML to Markdown conversion will be impossible.
Just deactivate it. The Markdown version is stored separately, so without the plugin, you'll just revert to editing the HTML version.
unfiltered_html
capability from publishing things they shouldn't be able to (stored XSS). Thanks to Takayuki Uchiyama of JPCERT for the responsible disclosure.add_post_type_support( 'post_type', 'markdown-osi' );
to enable Markdown on custom post types. This makes it play nicely with Jetpack's Custom CSS module, which stores your CSS in a custom post type.wp.*
XML-RPC methods for full remote posting/editing capability