Last modified by Marc Lijour on 2006/12/28

Question How to implement a custom radeox filter or macro?

To implement a custom filter or macro with radeox you need to add to XWiki Java code, repackage XWiki and restart the application (eg. in Tomcat or in Jetty). Step by step, you would 

  1. Write a new class in the com.xpn.xwiki.render.[filter/macro] package. You can look at the existing classes for an example. Some are simple, like StrongFilter, which rely on the match/print configuration (see item 2). You must define a key for the filter/macro.
  2. Add the "match" and "print" regular expressions in the core/src/main/resources/ file.
  3. Register the new class in core/src/main/resources/META-INF/services/* file. Just add the full classname in the corresponding file.

For more details about how a radeox filter/macro works, please consult the radeox documentation (around page 16).


Get Connected