Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Markdown editor plugin for Question2Answer
tree: e3c29a042f

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
css
pagedown
README
highlight.js
inc.markdown.php
qa-markdown-admin.php
qa-markdown-editor.php
qa-markdown-layer.php
qa-markdown-viewer.php
qa-plugin.php

README

-------------------------------------------------
MARKDOWN EDITOR
Question2Answer plugin
-------------------------------------------------

This is an editor plugin for popular open source Q&A platform, Question2Answer <question2answer.org>. It uses Markdown to format posts, which is a simple text-friendly markup language using for example **bold** for bold text or > for quoting sources.

The plugin uses modified versions of the WMD and Showdown scripts for the editor and live preview respectively.



INSTALLATION
-------------------------------------------------

1. Download and extract the `markdown-editor` folder to the `qa-plugins` folder in your Q2A installation.
2. It is not necessary to copy the css for this version; if you have it in your theme file, you can safely remove it.
3. Log in to your Q2A site as a Super Administrator and head to Admin > Posting.
4. Set the default editor for questions and answers to 'Markdown Editor'. (The editor does also work for comments, but I would recommend sticking to plain text.)



EXTRA BITS
-------------------------------------------------

Converting old posts:
If you have been running your Q2A site for a little while, you may wish to convert old content to Markdown automatically using the SQL query below. This does not work reliably for HTML content (created via the WYSIWYG editor). It is fairly safe for plain text content but make sure you check your posts afterwards as some formatting may go awry.
Make sure to change `qa_` below to your installation's table prefix if it is different.

    UPDATE qa_posts SET format='markdown' WHERE format='' AND type IN ('Q', 'A', 'Q_HIDDEN', 'A_HIDDEN')



Something went wrong with that request. Please try again.