Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Testing markdown syntax highlighting plugin

+6 votes
asked Feb 21, 2012 in Plugins by NoahY
edited Feb 21, 2012 by NoahY

Using Scott Vivian's great Markdown plugin, I made a couple of modifications, biggest is to add syntax highlighting.  The other is to automatically add the css to the page, so no need to add it to your theme manually.  If you have added the css to your theme already, you can remove it when using this version.


UPDATE: now includes style switching between 16 styles of syntax highlighting.

Syntax highlighting uses highlight.js from this page:


41 programming languages are supported, 16 styles via admin/plugins. 

Here's screenshots of the highlighting:

and the displayed output:

Full example via the original site:


commented Mar 25, 2012 by William Orellana

Is it possible to use the markdown editor to upload images?
commented Nov 30, 2012 by Pinkilla
Works fine.

Perhaps add this to INSTALL section

5. Go to "Plugins" tab and enable checkbox "Enable syntax highlighting"

Thanks a lot for this plugin.

2 Answers

+1 vote
answered Feb 28, 2012 by anhmjn

I have a notice on the top of Plugin Administration page:

Notice: Undefined variable: idx in D:\xampp\htdocs\qa-plugin\markdown-editor\qa-markdown-admin.php on line 80

commented Feb 29, 2012 by NoahY
garbage code, sorry... should be fixed now
+1 vote
answered Mar 25, 2012 by rajul885

I am getting some problem with your markdown plugin :
example if i write :
i do'nt need 

in markdown editor after saving post it shows :
i do/'nt need

it add backslash in text after saving.
please take a look in this matter.