• Stars
    star
    112
  • Rank 312,240 (Top 7 %)
  • Language
    PHP
  • Created over 12 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WP-MarkDown plug-in. Allows Markdown to be enabled in posts, comments and bbPress forums.

WP-Markdown

Contributors: stephenharris
Donate link: http://www.stephenharris.info
Tags: markdown, formatting,prettify,syntax highlighter,code
Requires at least: 3.1
Tested up to: 4.9.1
Stable tag: 1.6.0

Allows Markdown to be enabled in posts, comments and bbPress forums.

Description

This plugin allows you to write posts (of any post type) using the Markdown syntax. The plugin converts the Markdown into HTML prior to saving the post. When editing a post, the plugin converts it back into Markdown syntax.

The plugin also allows you to enable Markdown in comments and bbPress forums. In these instances the plugin adds a toolbar, and preview of the processed Markdown with Prettify syntax highlighter applied (similiar to that used in the Stack Exchange websites such as WordPress Stack Exchange).

WP-Markdown stores the processed HTML, so deactivating the plugin will not affect your posts, comments or bbPress forums.

Installation

Installation is standard and straight forward.

  1. Upload wp-markdown folder (and all its contents) to the /wp-content/plugins/ directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Go to your Settings > Writing page and enable Markdown for the appropriate post types and comments.

Frequently Asked Questions

How do I use Markdown syntax?

For information on how to use Markdown syntax, please read: Markdown: syntax.

What happens to the post content if I uninstall the plugin?

The plugin uses Markdown to generate the appropriate HTML prior to the post saving to the database. When you edit a post, it is converted back to Markdown syntax. Once the plugin is uninstalled you'll simply revert to editing the posts' HTML.

How do I embed content?

A clean install of WordPress allows you to (for example) include a YouTube url on a separate line, whereupon it will automatically embed the video. This is not possible with WP-Markdown installed (I tried - I broke more things. But if you manage it, feel free to make a pull-request: https://github.com/stephenharris/WP-MarkDown).

You'll need to use the [embed] shortcode.

How do I prevent a bit of the page being parsed as Markdown?

Enclose it in a div tag. It'll be ignored.

How do I allow the contents of a div tag to be parsed as Markdown?

Use <div markdown="1">.

Screenshots

1. The Markdown toolbar and previewer on a bbPress forum.

The Markdown toolbar and previewer on a bbPress forum.

2. Plugin settings, located at the bottom of the Writing settings page.

Plugin settings, located at the bottom of the Writing settings page.

3. The Markdown toolbar and previewer on a comment form.

The Markdown toolbar and previewer on a comment form.

4. Example of Markdown syntax.

Example of Markdown syntax.

5. The output of the example Markdown.

The output of the example Markdown.

Changelog

1.6 - 25th December 2017

  • Fixed PHP7 deprecation notices
  • Load prettify.js in the footer (See #60 )
  • Ensure the toolbar javascript runs as late as possible. Fixes conflict with Shortcoder which calls Qtags late on and destroys the markdown toolbar. Fixes #53.
  • Update markdown extra version. Thanks to @lite3. Closes #43.
  • By default balance tags before HTML is converted to markdown. (Adds filter to prevent this behaviour). See #47.

1.5.1

  • Addresses issues with (since withdrawn) 1.5.0 version.

1.5

  • Handle tables. See #35.
  • Fix responsive layout issue. See #31.
  • Use compressed prettify.js.
  • Fix bug with lists not being escaped.
  • Fix textdomain. Change to 'wp-markdown'.
  • Add language file.
  • Fix incompatability issues with bbPress.

1.4

  • Fix issue with consecutive shortcodes.
  • Fix editing bbPress topics/replies on the front-end corrupts Markdown. See #25.

1.3

  • Apply kses and balance tags after MD->HTML conversion. See#23.
  • Compress scripts and minify icon sprite. See #7.
  • Add 'more' tag to Markdown editor.
  • Add support for iframes. See #22.
  • Fix bug with underscores in shortcodes.
  • Add support for tbody, tfoot and thead tags.
  • Refactoring including renaming of plugin style and script handles.

1.2

  • Fix problems with images nested inside links. See #12.
  • Ensure prettify is loaded, if needed, on home page. See #6.
  • Update Markdownify.
  • Update Prettify.

1.1.6

  • Remove the wpautop/unwpautop functions. If using oEmbed, use embed shortcodes.
  • Add public wrapper functions.
  • Remove bbPress front-end TinyMCE editor if using Markdown.

1.1.5

  • Fix bug introduced in 1.1.4 where line breaks are stripped (affects code blocks).

1.1.4

  • Fix bug where oEmbed would not work. Thanks to Michael & Vinicius.
  • Add a filter for Markdown 'help' text: wpmarkdown_help_text.
  • Support for Markdown Extra (currently not supported in pagedown previewer).

1.1.3

  • Stable with WordPress 3.4.
  • Fix bug relating title attributes for links and images.

1.1.2

  • Fix bug relating to comments by logged out users.

1.1.1

  • Fix backslash bug.

1.1

  • Add option to replace TinyMCE with Markdown help bar on post editor.

1.0

  • Initial release.

Upgrade Notice

1.1.5

If you have upgraded to 1.1.4, please upgrade to 1.1.5. This release fixes a bug introduced in 1.1.4 (see http://wordpress.org/support/topic/plugin-wp-markdown-breaks-oembed-support)

1.1

  • Added option to enable the Markdown help bar on the back-end post editor. Simply check Markdown help bar for 'Post editor' in the settings.

More Repositories

1

Event-Organiser

WordPress plug-in, Event Organiser, development repository
PHP
100
star
2

grunt-wp-deploy

Grunt plug-in to deploy a build directory to WordPress' SVN
JavaScript
64
star
3

WordPress-Post-Type-Archive-Links

Adds a metabox on Appearance > Menus to create menu items pointing to post type archives
PHP
55
star
4

grunt-pot

Scan files and creates a .pot file using xgettext
JavaScript
53
star
5

wp-readme-to-markdown

Grunt plugin which Converts WP readme.txt file to markdown (readme.md)
JavaScript
43
star
6

WP-Query-Builder

An expressive query builder for WordPress based on Laravel's Query Builder
PHP
36
star
7

who-is-online

A simple plug-in to alert users when other users log-in and out of WordPress. Demonstrating the Heartbeat API and based on an up-coming series at http://wp.tutsplus.com/
PHP
12
star
8

grunt-checktextdomain

Checks gettext function calls for missing or incorrect text domain.
JavaScript
11
star
9

terraform-aws-efs-mount

Creates EFS, mount targets and security groups for use with EC2 to mount an EFS
HCL
5
star
10

Event-Organiser-Posterboard

Display events in as a responsive posterboard.
JavaScript
5
star
11

phpqif

A simple PHP library for writing QIF files
PHP
3
star
12

event-organiser-rest-api

Integration for Event Organiser with WP REST API.
PHP
3
star
13

Event-Organiser-Booking-Notification-Settings

Adds UI settings so that you can change which emails are notified when a booking is made and/or confirmed.
PHP
2
star
14

Event-Organiser-CSV

This plug-in allows to import events from a CSV file into Event Organiser. You can also export events from Event Organiser into a CSV file.
PHP
2
star
15

insert-bible-verse

WordPress plug-in that provides a shortcode to insert Bible verses into the body of any page, post or custom post type
PHP
2
star
16

EnigmaJ

A Java simulator of the Enigma machine.
Java
1
star
17

guise

A WordPress framework for modifying the UI
PHP
1
star
18

react-json-form

JavaScript
1
star
19

phpunit-require-wordpress-version

Skip WordPress PHPUnit tests based on the version of WordPress running using @ requires WordPress
PHP
1
star
20

grunt-checkwpversion

Check the versions of your WordPress plug-in against the readme stable tag and/or your package.json.
JavaScript
1
star
21

py_obfuscate

A python module for obfuscating a mysqldump file
Python
1
star
22

multisite-admin-notices

Allows a network admin to create admin notices for blog admins.
PHP
1
star
23

yolo-walkthrough

Example walkthrough of training YOLO to identify classes of objects
Python
1
star
24

Event-Organiser-VAT

Adds VAT to ticket sales with Event Organiser (& Event Organiser Pro)
PHP
1
star