We'd like to add C# to the list of languages for code syntax highlighting in Clearspace.
Is there an existing macro for this?
Any hints about its creation are appreciated. I only found this docon Building macros but don't want to re-invent the wheel.
Thanks,
-Eugene
Eugene,
I don't think that we presently have anything like this in our plugins community. To implement the macro, I would recommend overriding the CodeMacro spring definition (in spring-renderContext.xml) to add in your own custom formatter:
<bean id="codeMacro" class="com.jivesoftware.community.renderer.macro.CodeMacro" scope="prototype">
<property name="enabled" value="true" />
<property name="formatters">
<list>
<ref bean="plainCodeFormatter"/>
<ref bean="javaCodeFormatter"/>
<ref bean="xmlCodeFormatter"/>
<ref bean="sqlCodeFormatter"/>
<ref bean="htmlCodeFormatter"/>
</list>
</property>
<property name="defaultFormatter" ref="plainCodeFormatter"/>
</bean>
You'll need to create a new spring bean definition for your custom formatter and then add it to the list of formatters above. Take a look at the javaCodeFormatter for an example formatter.
Eugene, was this helpful? Did you have any additional questions?
Hey Austen,
Is there a macro for C++ code highlighting? If not, is there a tutorial somewhere that will tell me how to create one?
Thanks,
Nathan
Jive combines the most powerful features of collaboration software, community software,
social networking software & social media monitoring into the leading SBS solution.
© Copyright 2000–2010 Jive Software. All rights reserved.
915 SW Stark St., Suite 400, Portland, OR 97205
Sales: 877-495-3700 | General: 503-295-3700
Privacy Policy | Sitemap | Jobs | Contact Us