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

Need help with testing Syntax Highlighter Plugin

+7 votes
asked Jan 11, 2011 in Plugins by Ernest Mikolajczyk
edited Nov 13, 2011 by gidgreen

I've made the Syntax Highlighter plugin for Question2Answer. Any volunteers for testing? You can download it here:


I need feedback on compatibility with different browsers (in firefox 3.6.13, and IE 8 works fine) and possibly conflicts with other plugins (I haven't found any).


Installation instructions:

  1. Download the file and unzip
  2. Place unzipped files in /qa-plugin/syntax-highlighter directory of your Q2A site


Just wrap your code in one of the following:

[source language='css']code here[/source]
[code language='css']code here[/code]
[sourcecode lang='css']code here[/sourcecode]
[source lang='css']code here[/source]
[code lang='css']code here[/code]
[sourcecode='css']code here[/sourcecode]
[source='css']code here[/source]
[code='css']code here[/code]
[lang='css']code here[/lang]
[css]code here[/css] (or any of the supported language)

Supported languages:

  • as3, actionscript3
  • bash, shell
  • cf, coldfusion
  • c-sharp, csharp
  • cpp, c
  • css
  • delphi, pas, pascal
  • diff, patch
  • erl, erlang
  • groovy
  • js, jscript, javascript
  • java
  • jfx, javafx
  • perl, pl
  • php
  • plain, text
  • ps, powershell
  • py, python
  • rails, ror, ruby
  • scala
  • sql
  • vb, vbnet
  • xml, xhtml, xslt, html, xhtml
commented Feb 21, 2012 by Svetlin Nakov
I uninstalled it because it breaks my RSS feeds. Can you fix this bug? The plugin should leave the RSS feeds unmodified, right?
commented Feb 12, 2013 by zarinfam
The link is broken.
commented Jun 26, 2013 by kmike
Anyone has mirror ?

5 Answers

0 votes
answered Jan 12, 2011 by Saurav Sharma
just testing
0 votes
answered Jan 17, 2011 by Soul_Assassin
Ive been looking all over for a solution like this, however I do get some weird results. The sourcecode window seems to also print the html tags from the WYSIWYG editor. How can this be avoided?
commented Jan 19, 2011 by Ernest Mikolajczyk
Have you tried to paste the code into notepad firstly to get rid of all invisible html tags and then copy from notepad and paste into Q2A?
0 votes
answered Feb 5, 2011 by Jura
edited Feb 5, 2011 by Jura
It works! Great job Ernest! :) I'm wondering though, is there a way to 'wrap' long lines of code, so that the layout doesn't get messy (and prevents from having to use the horizontal scroll bar)? That would make it a perfect plugin!


I just found that line wrapping isn't possible in version 3 (https://bitbucket.org/alexg/syntaxhighlighter/issue/224/horizontal-line-wrapping-doesnt-work ), but it did work in version 2. Can this be added to the plugin, or, alternatively, could you give some pointers as to how to downgrade this plugin?
commented Feb 5, 2011 by Ernest Mikolajczyk
You are absolutely right. Version 3 doesn't support line wrapping. I've chosen this version because I had some problems with copying source code in v.2 But I'll try to make another plugin for version 2 as well. I only need some time ;)
commented Feb 6, 2011 by Jura
That would be awesome Ernest. However, the current version also works good, so thanks already for that great job, stil haven't found any errors with it. :)
0 votes
answered Jan 22, 2012 by thewoxs
I just testing your plugin, it works but the source code was displayed with so many empty lines, its like one paragraph for one code line, eating so much space, can you help me how to fix this ?? thank you for developing this plugin :)
0 votes
answered Feb 21, 2012 by NoahY

I've uploaded a version of the markdown plugin to GitHub that does highlighting:


Here's the thread for it with some screenshots: