Led & Sustained by

G2one Logo

Developed with

Intellij

Powered by

Spring

Radeox plugin

Radeox plugin

RadeoxGrailsPlugin.groovy
def title       = 'A plugin for the Radeox Wiki-render engine to allow easy markup and cross-linking.'
def author      = 'Dierk Koenig'
def authorEmail = 'dierk.koenig at canoo.com'
def description = '''\
The Radeox plugin provides a new tag <g:radeoxRender> some content </g:radeoxRender> that 
processes the inlined content according to the Radeox Wiki Format, including directives like
__bold__ and ~~italic~~ but also more advanced macros like {table} and {list-of-macros}.
You can also define your own macros in Groovy.
Radeox is easy to extend and customize. The plugin comes with an inital implementation of 
cross liking to pages that are marked up like [pageName] in the content. this will link
to the PageController show action.'''

For more details about the radeox wiki render engine, see http://radeox.org.

For a typical usage inside a wiki, see http://snipsnap.org.

For an overview of available markup options, see http://snipsnap.org/space/snipsnap-help.

Usage in Grails

Main usage scenarios for this plugin in a Grails application:

  • you are developing a Wiki based on Grails
  • part of your Grails app should have a wiki like behaviour (including automatic internal links)
  • you want to allow users to use radeox markup in plain text fields (no internal links needed)
  • you want to use radeox markup in your GSP pages or other rendering logic for convenience

How to customize

As of the current version (0.1) you best look into the provided artifacts

location artifact note
domain Page.groovy Sample domain class that uses the plugin in a simple Wiki.
taglib RadeoxTagLib.groovy Provides the <g:radeoxRender> tag and wires up the engine. Register more filters or macros here. Adapt Radeox config here.
utils GrailsWikiEngine.groovy Hook to specify how internal wiki links should work in you Grails app. Adapt as needed.
views page/* Sample views that use the new tag in a simple Wiki.
utils GroovyMacro.groovy Custom macro example.

The code is pretty small and easy to adapt.

Still to do:

  • webtests for the plugin (not sure how to do that...)
  • url mapping from app/page/show/$id to app/$name
  • enhance GroovyMacro to execute the contained code in a sandbox
  • make a Google-suggest-like sidebar for known page names
  • PageNameService that does name-to-id mapping with caching
  • backlinks ('who links to this page?')

Known issues:

  • requires grails 0.5.5
</