activeCollab does not have a built in syntax highlighter.
You can check out SyntaxHighlighter (we use it for this forum) and see if you can implement it, but note that activeCollab treats all code the same, so it will be hard to distinguish which higher to use.
I have taken a look at it and seems that it will do the job.. can you give more hints on implementation. Where to go, what to change.. thanks in advance!
Sorry, I can't provide any exact steps (I didn't do the implementation of the editor in our forum, it was done by a former employee). It should be pretty straightforward if you already hacked the system and worked with JS.
The only big problem is that I don't see a way how you can tell highlighter which syntax to use - activeCollab treats all code the same, and you can't add classes to it.
I tried that.. I got two questions:
1- The fact that the system does some changes to the tags when posted i.e.
<pre name="code" class="html:nocontrols:firstline[10]">
instead of <pre name="code" class="html:collapse">
Does that mean we should further tweaking to the code, turn off a feature or something?!
2- They are recommending js and css referanced to be right before the </body> closing tag.. can that be done?
1. All code that you insert in editor will be escaped and displayed as is, not interpreted. activeCollab makes sure that no invalid HTML code can leak into the database. You cannot add class to preformatted code or enter <PRE> element manually.
2. There's no need to add JS code to the end of the page. What you can do, is wrap code that you want to be executed when page loads in ready() event of the document, like this:
$(document).ready(function() {
// Code that needs to be executed when full page is loaded
});
Just make sure that this block is executed in the file that's loaded after jQuery files is loaded.
We haven't added support for extending styles list in the editor. It most probably can be hacked to work, but I really can't provide any assistance there.
JS will have problem with targeting <
I'm sorry that I can't dedicate more time to look into this and provide more assistance. Really understanding JavaScript, jQuery and TinyMCE is required to make this hack work properly.